设置轮播图后报错:react-dom.development.js:6202 Unable to preventDefault inside passive event listener invocation
-
-
轮播图的自动轮播与浏览器的阻止默认事件相悖,可找到相应文件注释阻止默认实践
解决方案:
把默认事件注释
@2
解决方案 去掉 React.StrictMode
@3
安装移动端rem自适应的时候出问题
报错ValidationError: Invalid options object. postcss Loader has been initialized using an opti ons object
Uncaught Error: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
- options has an unknown property 'plugins'. These properties are valid:
object { postcssOptions?, execute?, sourceMap? }
卸载less-loader,安装less-loader@2.1.1
yarn remove less-loader
yarn add postcss-loader@2.1.1
@4
yarn安装包的时候,报错
yarn
yarn install v1.19.1
info No lockfile found.
info There appears to be trouble with your network connection. Retrying...
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.npm.taobao.org/animate.css: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND web-proxy".
- 错误发生意外错误:“https://registry.npm.taobao.org/animate.css:无法建立隧道套接字
taobao镜像不可用
还原成npm 的
执行
yarn config set registry https://registry.npmjs.org --global