问题遇到的现象和发生背景
1
问题相关代码,请勿粘贴截图
2
运行结果及报错内容
3
我的解答思路和尝试过的方法
4
我想要达到的结果
问题的产生:我把一个别人的vue3项目拉取+初始化配置:npm install .然后运行报错
在线求解答:
在终端中的报错:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: vue3-ts-cms@0.1.0
npm ERR! Found: vue@3.2.37
npm ERR! node_modules/vue
npm ERR! peerOptional vue@"^2 || ^3.0.0-0" from @vue/babel-preset-app@4.5.19
npm ERR! @vue/babel-preset-app@"^4.5.19" from @vue/cli-plugin-babel@4.5.19
npm ERR! node_modules/@vue/cli-plugin-babel
npm ERR! dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR! peer vue@"3.2.37" from @vue/server-renderer@3.2.37
npm ERR! node_modules/@vue/server-renderer
npm ERR! @vue/server-renderer@"3.2.37" from vue@3.2.37
npm ERR! 2 more (the root project, @vue/cli-plugin-typescript)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! element-plus@"^1.0.2-beta.62" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vue@3.1.5
npm ERR! node_modules/vue
npm ERR! peer vue@"3.1.x" from element-plus@1.0.2-beta.71
npm ERR! A complete log of this run can be found in:
npm ERR! D:\nodejs\node_cache_logs\2022-07-13T13_26_53_818Z-debug-0.log
PS E:\coderwhyvue3\webpack(自测)\vue3ceshi> npm install vue@3.1.x -S
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: vue3-ts-cms@0.1.0
npm ERR! Found: vue@3.1.5
npm ERR! node_modules/vue
npm ERR! vue@"3.1.x" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^3.2.0" from vue-router@4.1.2
npm ERR! node_modules/vue-router
npm ERR! vue-router@"^4.0.10" from the root project
npm ERR!