加上–legacypeerdeps

例如npm install xxx –legacy-peerdeps

-legacy-peerdeps,目的是绕过peerDependency自动安装;它告诉 NPM 忽略项目引入各个modules之间的相同modules但不同版本问题并继续安装,保证各个引入依赖之间对自身所使用的不同版本modules共存。


npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: happyfri@1.0.2
npm ERR! Found: less@3.13.1
npm ERR! node_modules/less
npm ERR!   dev less@"^3.9.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer less@"^2.3.1" from less-loader@2.2.3
npm ERR! node_modules/less-loader
npm ERR!   dev less-loader@"^2.2.3" 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 C:UsersAdministratorAppDataLocalnpm-cacheeresolve-report.txt for a full report.

原文地址:https://blog.csdn.net/RUBGH/article/details/127331468

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

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

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

发表回复

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