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

PS F:devops_commoncloud-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:UsersMrAppDataLocal pm-cache_logs?1-05-01T03_13_10_382Z-debug.log

PS F:devops_commoncloud-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:UsersMrAppDataLocal pm-cache_logs?1-05-01T03_13_18_530Z-debug.log

PS F:devops_commoncloud-vue> npm cache clean -f

npm WARN using --force Recommended protections disabled.

PS F:devops_commoncloud-vue>

PS F:devops_commoncloud-vue> npm install

npm ERR! code ERESOLVE

npm ERR! ERESOLVE unable to resolve dependency tree

npm ERR!

npm ERR! While resolving: cloud-ui@1.0.0

npm ERR! Found: less@2.7.3

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 less-loader@7.3.0

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:UsersMrAppDataLocal pm-cacheeresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:

npm ERR! C:UsersMrAppDataLocal pm-cache_logs?1-05-01T03_14_21_801Z-debug.log

PS F:devops_commoncloud-vue> ^C

PS F:devops_commoncloud-vue> npm install npm@6.14.10 -g

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

found 0 vulnerabilities

PS F:devops_commoncloud-vue> npm install

问题分析:npm 版本太高

问题解决:

npm install npm@6.14.10 -g