问题遇到的现象和发生背景
用npm安装vuex3。
安装命令:
npm i --save vuex@3
输入后出现以下错误:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: vue@3.2.40
npm ERR! node_modules/vue
npm ERR! vue@"^3.2.36" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^2.0.0" from vuex@3.6.2
npm ERR! node_modules/vuex
npm ERR! vuex@"3" 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 C:\Users\HappyQ\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HappyQ\AppData\Local\npm-cache\_logs\2022-10-07T01_54_28_937Z-debug-0.log
好像说的是我电脑同时有vue3和vue2,不能把vuex3弄到我这个vue2的项目上。这个如何解决?