vue-router安装失败
安装vue-router时出现的错误及解决方法
·
当安装vue-router遇到以下问题,
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.
出现此问题的原因是:vue-router的版本太高了,应安装低版本,然后执行命令:npm i vue-router@3.5.3 -S (此处安装的是3.5.3版本的)
查找vue-router版本的方法:进入npm中查找
更多推荐
已为社区贡献1条内容
所有评论(0)