无法解决对样板项目的依赖关系

Car*_*sen 6 aspnetboilerplate

我已经下载了Angular 5 / .NET 5 项目,通常当我运行命令 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\_logs\2021-03-24T08_34_44_177Z-debug.log
Run Code Online (Sandbox Code Playgroud)

通常我对这个命令没有任何问题,所以我想知道这是我的设置还是项目的问题。

如果需要,我可以提交完整的报告。

小智 6

考虑到线路

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
Run Code Online (Sandbox Code Playgroud)

该错误来自 codelyzer@5.2.2 依赖项,我在 github 上发现了这个已关闭的问题,这表明这并不是真正的问题,
运行npm install --legacy-peer-deps可以解决它,有关更多信息,请查看此