0

I have these dev dependencies in my Angular 13 project

  "devDependencies": {
    "@angular-devkit/build-angular": "~13.2.5",
    "@angular/cli": "~13.2.5",
    "@angular/compiler-cli": "~13.2.0",

When I run npm i, I get this error

npm ERR! Conflicting peer dependency: @angular/[email protected]
npm ERR! node_modules/@angular/compiler
npm ERR!   peer @angular/compiler@"13.2.7" from @angular/[email protected]
npm ERR!   node_modules/@angular/compiler-cli
npm ERR!     dev @angular/compiler-cli@"~13.2.0" from the root project
npm ERR!     peer @angular/compiler-cli@"^13.0.0" from @angular-devkit/[email protected]
npm ERR!     node_modules/@angular-devkit/build-angular
npm ERR!       dev @angular-devkit/build-angular@"~13.2.5" from the root project
npm ERR!     1 more (@ngtools/webpack)

I'm confused about how to resolve this. Does this mean I need to upgrade my compiler cli or downgrade my devkit? I'm also confused about how to figureout what the appropriate compatible versions are. How do I figure out the appropriate version of devkit to satisfy the "npm i" process?

2
  • If you are stuck at this part for a long time and need to solve this asap, just add --force at the end of you npm i @xxx Commented Aug 24, 2022 at 14:20
  • Thanks, unfortunately I'm trying to get my code to build with a Git action that uses "npm i". It is not an option to adjust the parameters of the Git action so I'm trying to figure out what the error above means. Commented Aug 24, 2022 at 15:51

1 Answer 1

0

The @angular/compiler-cli version does not match your @angular/compiler version which is located under dependencies

Sign up to request clarification or add additional context in comments.

2 Comments

Hate to be dense, but can you spell it out for me? Does the @angular/compiler-cli version listed under devDependencies need to be 13.2.7?
Yes I think so. You have to change it in your package.json

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.