npm 安装依赖报错npm ERR! ERESOLVE unable to resolve dependency tree


PS F:\devops_common\cloud-vue> npm cache   cache sudo npm cache clean -f
npm WARN using --force Recommended protections disabled.
npm ERR! code EUSAGE
npm ERR! npm cache  
npm ERR! 
npm ERR! Manipulates packages cache
npm ERR! 
npm ERR! Usage:
npm ERR! npm cache add
npm ERR! npm cache add
npm ERR! npm cache add
npm ERR! npm cache add @
npm ERR! npm cache clean
npm ERR! npm cache verify
npm ERR!
npm ERR! Run "npm help cache" for more info

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Mr\AppData\Local\npm-cache\_logs\2021-05-01T03_13_10_382Z-debug.log
PS F:\devops_common\cloud-vue> npm cache
npm ERR! code EUSAGE
npm ERR! npm cache
npm ERR!
npm ERR! Manipulates packages cache
npm ERR!
npm ERR! Usage:
npm ERR! npm cache add
npm ERR! npm cache add @
npm ERR! npm cache clean
npm ERR! npm cache verify
npm ERR!
npm ERR! Run "npm help cache" for more info

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Mr\AppData\Local\npm-cache\_logs\2021-05-01T03_13_18_530Z-debug.log
PS F:\devops_common\cloud-vue> npm cache clean -f
npm WARN using --force Recommended protections disabled.
PS F:\devops_common\cloud-vue>
PS F:\devops_common\cloud-vue> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/less
npm ERR!   less@"^2.7.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer less@"^3.5.0 || ^4.0.0" from [email protected]
npm ERR!   less-loader@"^7.3.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!
npm ERR! See C:\Users\Mr\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Mr\AppData\Local\npm-cache\_logs\2021-05-01T03_14_21_801Z-debug.log
PS F:\devops_common\cloud-vue> ^C
PS F:\devops_common\cloud-vue> npm install [email protected] -g

added 2 packages, removed 236 packages, changed 3 packages, and audited 54 packages in 14s

found 0 vulnerabilities
PS F:\devops_common\cloud-vue> npm install

 

 

问题分析:npm 版本太高

问题解决:

npm install [email protected] -g

你可能感兴趣的:(vue,npm,vue.js)