vue-router安装失败
vue-router安装出现ERR! code ERESOLVEnpm ERR! code ERESOLVEnpm ERR! ERESOLVE unable to resolve dependency treenpm ERR!npm ERR! While resolving: vue_cli_app@0.1.0npm ERR! Found: less@4.1.2npm ERR! node_modu
·
vue-router安装出现ERR! code ERESOLVE
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: vue_cli_app@0.1.0
npm ERR! Found: less@4.1.2
npm ERR! node_modules/less
npm ERR! less@"^4.1.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! node_modules/less-loader
npm ERR! less-loader@"^5.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See E:\nodeJs\NodeJs\node_cache\eresolve-report.txt for a full report.
错误原因:
*npm版本过高*
出现以上错误的时候,和less-loader等安装失败的原因类似,都是由于npm版本过高导致的不兼容问题。
解决方法:
可安装低版本的npm,如:
npm install npm@6.14.10 -g
这样会直接下载此版本的npm并自动删除以前的版本和配置
更多推荐
所有评论(0)