Search code examples
aspnetboilerplate

Cant resolve dependency on Boilerplate project


I've downloaded a Angular 5 / .NET 5 project, and normally when I run the command npm install, I don't have any problems.

But since yesterday when downloading a project and running this command I get this error:

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: [email protected]
npm ERR! Found: @angular/[email protected]
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 [email protected]
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

Normally I don't have any problem with this command so I'm wondering if it's a problem with my setup or with the project.

I can submit the full report if requested.


Solution

  • considering the line

    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 [email protected]
    

    the error is from the [email protected] dependencies, I found this closed issue on github which indicates that it is not really a problem
    running npm install --legacy-peer-deps could solve it, for more information check this out.