Mark
Mark

Reputation: 4950

Problems updating Angular project

Here are the results of ng update command:

We analyzed your package.json, there are some packages to update:

  Name                               Version                  Command to update
 --------------------------------------------------------------------------------
  @angular/cli                       7.3.10 -> 10.0.5         ng update @angular/cli
  @angular/core                      7.2.16 -> 10.0.8         ng update @angular/core


There might be additional packages that are outdated.

Both ng update @angular/cli and ng update @angular/core return the following:

Package "codelyzer" has an incompatible peer dependency to "@angular/core" (requires ">=2.3.1 <8.0.0 || >7.0.0-beta <8.0.0" (extended), would install "10.0.8").
Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.3.1 <8.0.0 || >7.0.0-beta <8.0.0" (extended), would install "10.0.8").

Any idea what to do?

Thanks

Upvotes: 0

Views: 979

Answers (1)

Roy
Roy

Reputation: 8069

It is not recommended by Angular side to skip major versions of their framework.

If you are updating from one major version to another, then we recommend that you don't skip major versions. Follow the instructions to incrementally update to the next major version, testing and validating at each step. For example, if you want to update from version 6.x.x to version 8.x.x, we recommend that you update to the latest 7.x.x release first. After successfully updating to 7.x.x, you can then update to 8.x.x.

With the handy Angular Update Guide, you can specify which version you have and what steps you need to take to incrementally make the giant leap to have the latest version of Angular in your app.

So the path would be:

  1. Update 7.2 » 8.2
  2. Update 8.2 » 9.1
  3. Update 9.1 » 10.0

Upvotes: 1

Related Questions