当我创建一个vuex-demo的时候,npm install vuex 时出错了

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: vuex-demo@0.1.0
npm ERR! Found: vue@2.6.14
npm ERR! node_modules/vue
npm ERR!   vue@"^2.6.11" from the root project     
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! node_modules/vuex
npm ERR!   vuex@"^4.0.2" 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:\work\node_cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\work\node_cache\_logs\2022-02-11T05_42_19_463Z-debug.log

这个报错代表着我的vue没有确定版本,此时我npm install vuex@3后就再次npm install vuex就能成功下载。

Logo

前往低代码交流专区

更多推荐