相关疑难解决方法(0)

我如何阅读 npm“冲突的对等依赖”错误消息?

我正在尝试升级我拥有的项目的一些 npm 依赖项,但出现“冲突的对等依赖项”错误。

我在这个网站上看到很多问题,寻求帮助修复此类错误。但是,我一直在努力寻找有关这些错误实际含义的信息。我觉得如果我理解了这一点,我就有机会自己弄清楚如何解决问题。

这是我试图解释的错误消息:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: @angular-devkit/build-angular@0.1102.5
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR!   dev @angular-devkit/build-angular@"~0.1102.9" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev @angular-devkit/build-angular@"~0.1102.9" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @angular/localize@11.2.10
npm ERR! node_modules/@angular/localize
npm ERR!   peerOptional @angular/localize@"^11.0.0 || ^11.2.0-next" from @angular-devkit/build-angular@0.1102.9
npm ERR!   node_modules/@angular-devkit/build-angular
npm ERR!     dev @angular-devkit/build-angular@"~0.1102.9" from the …
Run Code Online (Sandbox Code Playgroud)

npm

8
推荐指数
2
解决办法
1986
查看次数

标签 统计

npm ×1