无法解决对样板项目的依赖
Cant resolve dependency on Boilerplate project
我已经下载了一个 Angular 5 / .NET 5 project,通常当我 运行 命令 npm install 时,我没有任何问题。
但是从昨天开始,当我下载一个项目并运行执行这个命令时,我得到了这个错误:
C:\Users\ca\source\repos\CCM\angular\src>npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: CCM@4.7.1
npm ERR! Found: @angular/compiler@10.2.1
npm ERR! node_modules/@angular/compiler
npm ERR! @angular/compiler@"^10.2.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" from codelyzer@5.2.2
npm ERR! node_modules/codelyzer
npm ERR! dev codelyzer@"^5.1.2" 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:\Users\ca\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ca\AppData\Local\npm-cache\_logs21-03-24T08_34_44_177Z-debug.log
通常我对这个命令没有任何问题,所以我想知道这是我的设置问题还是项目问题。
如果需要,我可以提交完整的报告。
考虑行
npm ERR! peer @angular/compiler@">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" from codelyzer@5.2.2
错误来自于 codelyzer@5.2.2 依赖项,我在 github 上找到了 this closed issue,这表明它不是真正的问题
运行 npm install --legacy-peer-deps
可以解决,更多信息.
我已经下载了一个 Angular 5 / .NET 5 project,通常当我 运行 命令 npm install 时,我没有任何问题。
但是从昨天开始,当我下载一个项目并运行执行这个命令时,我得到了这个错误:
C:\Users\ca\source\repos\CCM\angular\src>npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: CCM@4.7.1
npm ERR! Found: @angular/compiler@10.2.1
npm ERR! node_modules/@angular/compiler
npm ERR! @angular/compiler@"^10.2.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" from codelyzer@5.2.2
npm ERR! node_modules/codelyzer
npm ERR! dev codelyzer@"^5.1.2" 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:\Users\ca\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ca\AppData\Local\npm-cache\_logs21-03-24T08_34_44_177Z-debug.log
通常我对这个命令没有任何问题,所以我想知道这是我的设置问题还是项目问题。
如果需要,我可以提交完整的报告。
考虑行
npm ERR! peer @angular/compiler@">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" from codelyzer@5.2.2
错误来自于 codelyzer@5.2.2 依赖项,我在 github 上找到了 this closed issue,这表明它不是真正的问题
运行 npm install --legacy-peer-deps
可以解决,更多信息