npm install 无法下载依赖的问题
PS C:\Users\Administrator\Desktop\国民E家\gmchat_web_vue> npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: apus-aiops-web-h5@1.0.0
npm ERR! Found: webpack@3.12.0
npm ERR! node_modules/webpack
npm ERR! webpack@"^3.12.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^4.0.0 || ^5.0.0" from css-loader@3.6.0
npm ERR! node_modules/css-loader
npm ERR! dev css-loader@"^3.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Program Files\nodejs\node_cache\eresolve-report.txt for a full report.
如果你也遇到这个问题,全局设置cnpm就能解决:
npm install -g cnpm --registry=https://registry.npm.taobao.org
//或者
npm install -g cnpm --registry=https://r.npm.taobao.org