【Vue报错】npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR!

02-27 阅读 0评论

报错代码如下:

【Vue报错】npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR!,【Vue报错】npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR!,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,解决方案,错误,指令,第1张
(图片来源网络,侵删)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: webvue@0.1.0
npm ERR! Found: vue@3.2.47
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.12
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 D:\SoftWareLocation\node_js\node_cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR!     D:\SoftWareLocation\node_js\node_cache\_logs23-02-09T11_40_48_239Z-debug-0.log

报错原因:由于npm版本太高导致此错误发。npm的版本只要超大于或等于7.x.x,会在某些方面上更加严格,就会导致出现这种情况,低于7.x.x不会出现这种情况

查看npm版本:npm -v

解决方案

1.在指令后面都添加上 --legacy-peer-deps,如下

npm xxx --legacy-peer-deps

2.在指令后面都加上 --force,如下

npm xxx --force

3.降低npm版本(不推荐,谨慎)

npm install npm@6.14.12 -g  //降低版本指令,版本自己可选择

因为降低版本后,容易导致npm和node不相容,会出现很大的问题!!!

【Vue报错】npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR!,【Vue报错】npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR!,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,解决方案,错误,指令,第2张
(图片来源网络,侵删)
【Vue报错】npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR!,【Vue报错】npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR!,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,解决方案,错误,指令,第3张
(图片来源网络,侵删)

免责声明
本网站所收集的部分公开资料来源于AI生成和互联网,转载的目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

发表评论

快捷回复: 表情:
评论列表 (暂无评论,人围观)

还没有评论,来说两句吧...

目录[+]