npm i element-ui -S报错

2022-05-23  本文已影响0人  嗯o哼
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: test_project@0.1.0
npm ERR! Found: vue@3.2.36
npm ERR! node_modules/vue
npm ERR!   vue@"^3.2.13" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^2.5.17" from element-ui@2.15.8
npm ERR! node_modules/element-ui
npm ERR!   element-ui@"*" 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 /Users/lipengfei/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!    xxxxx/.npm/_logs/2022-05-23T07_13_15_438Z-debug-0.log

问题主要是安装的包与已经存在的包有冲突,使用强行通过就可以了

解决方案

npm install --force

如果指定编译选项,那命令就是npm install xxx(具体安装的包) --force

上一篇 下一篇

猜你喜欢

热点阅读