热门

最新

红包

立Flag

投票

同城

我的

发布
m0_63494886
毛毛虫效应
3 年前
truem0_63494886

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: routerdemo@0.1.0
npm ERR! Found: vue@2.6.14
npm ERR! node_modules/vue
npm ERR! vue@"^2.6.14" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^3.2.0" from vue-router@4.0.15
npm ERR! node_modules/vue-router
npm ERR! vue-router@"*" 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 D:\Node.js\node_cache\eresolve-report.txt for a full report.

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

安装失败的原因是:我安装的是Choose a version of Vue.js that you want to start the project with 2.x ,vue2.x版本兼用不了最新的版本的router,即这条命令(npm install vue-router -S),它默认安装高版本,解决方法:npm i vue-router@3.5.2(router版本) -S,用低版本即可

CSDN App 扫码分享
分享
1
2
打赏
  • 复制链接
  • 举报
下一条:
发现这个东西整整女朋友蛮好玩的
立即登录