美文网首页
vue记录:导入element ui时报错及解决

vue记录:导入element ui时报错及解决

作者: ning_e83f | 来源:发表于2023-08-08 21:46 被阅读0次

使用 npm i element-ui -S导入element ui,报错信息如下

npm ERR! code ERESOLVE

npm ERR! ERESOLVE unable to resolve dependency tree

npm ERR! 

npm ERR!While resolving:toolscat@0.0.0

npm ERR!Found:vue@3.3.4

npm ERR! node_modules/vue

npm ERR!  vue@"^3.3.4" from the root project

npm ERR! 

npm ERR! Could not resolve dependency:

npm ERR! peervue@"^2.5.17" fromelement-ui@2.15.13

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 i --legacy-peer-deps

然后用npm i element-ui -S --legacy-peer-deps导入element ui

相关文章

网友评论

      本文标题:vue记录:导入element ui时报错及解决

      本文链接:https://www.haomeiwen.com/subject/svwjedtx.html