问题:Vue项目安装插件出现下面报错


npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: lessloader@5.0.0
npm ERR! Found: less@4.1.2
npm ERR! node_modules/less
npm ERR!   dev less@”4.1.2″ from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer less@”^2.3.1 || ^3.0.0″ from lessloader@5.0.0
npm ERR! node_modules/lessloader
npm ERR!   dev lessloader@”^5.0.0″ from the root project
npm ERR!
npm ERR! Conflicting peer dependency: less@3.13.1
npm ERR! node_modules/less
npm ERR!   peer less@”^2.3.1 || ^3.0.0″ from lessloader@5.0.0
npm ERR!   node_modules/lessloader
npm ERR!     dev lessloader@”^5.0.0″ from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command withforce, orlegacypeerdeps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See D:Professional SoftwareNodeNodeInsatllnode_cacheeresolvereport.txt for a full report.

解决方法:在安装的 命令后面加

legacypeerdeps

具体应用例如下:

npm install echartssavelegacypeerdeps

原文地址:https://blog.csdn.net/weixin_56858521/article/details/127170870

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_46146.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注