2

I'm using Angular 8 and I'm facing most of the time an issue like below with incompatible peer dependencies. I'm wondering what's the best way to do?

ng update --all

Package "ngx-cookie-service" has an incompatible peer dependency to "@angular/core" (requires ">=4.2.0", would install "9.0.0-next.5").

Package "ngx-cookie-service" has an incompatible peer dependency to "@angular/platform-browser-dynamic" (requires ">=4.2.0", would install "9.0.0-next.5").

Package "ngx-cookie-service" has an incompatible peer dependency to "@angular/platform-browser" (requires ">=4.2.0", would install "9.0.0-next.5").

Package "@auth0/angular-jwt" has an incompatible peer dependency to "@angular/common" (requires ">=6.0.0", would install "9.0.0-next.5").

What I do is forcing the update ng update --all --force but I'm sure there is a better way to do it. When I force update I need to change the TypeScript version in packages.json file. The version is often too "advanced"

Sometimes updating dependencies one by one with ng update @angular/material for example works (not all the time).

Any idea?

2
  • It seems that NPM's semver implementation doesn't consider 9.0.0-next.5 to be >=4.2.0 or >=6.0.0. You can see this by playing with e.g. semver.npmjs.com. But without --next=true, ng update shouldn't update to the pre-release version. Commented Sep 5, 2019 at 13:58
  • 1
    Thanks, @jonsharpe. I don't use the next parameter. Weird that it tries to install a next version though. Even if I try ng update @angular/material --next=false I receive the same error. Commented Sep 5, 2019 at 14:06

1 Answer 1

2

This is an open bug in the Angular CLI.

See the issue here: ng update @angular/cli installs angular 8.2.0-next.0

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.