SVK
SVK

Reputation: 2197

How to upgrade angular version from 7 to 8?

Running ng update @angular/cli @angular/core I would get this every time

Package "@angular/compiler-cli" has an incompatible peer dependency to "@angular/compiler" (requires "8.2.0-next.1", would install "8.1.1") Package "ag-grid-angular" has an incompatible peer dependency to "@angular/compiler-cli" (requires ">=2.1.x" (extended), would install "8.2.0-next.1").

Package "angular-calendar" has an incompatible peer dependency to "@angular/core" (requires ">=5.0.0 <7.0.0" (extended), would install "8.1.1").

Package "@angular/compiler-cli" has an incompatible peer dependency to "@angular/compiler" (requires "8.2.0-next.1" (extended), would install "8.1.1").

Package "angular-calendar" has an incompatible peer dependency to "@angular/common" (requires ">=5.0.0 <7.0.0" (extended), would install "8.1.1").

Package "angular-calendar" has an incompatible peer dependency to "@angular/animations" (requires ">=5.0.0 <7.0.0" (extended), would install "8.1.1").

My Environment now is :

Angular CLI: 7.3.9
Node: 12.6.0
OS: win32 x64
Angular: 7.1.4
... common, compiler, compiler-cli, core, forms, http
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.12.4
@angular-devkit/build-angular      0.12.4
@angular-devkit/build-optimizer    0.12.4
@angular-devkit/build-webpack      0.12.4
@angular-devkit/core               7.2.4
@angular-devkit/schematics         7.3.9
@angular/animations                7.2.15
@angular/cdk                       7.3.7
@angular/cli                       7.3.9
@angular/material                  7.2.0
@angular/material-moment-adapter   7.3.7
@ngtools/webpack                   7.2.4
@schematics/angular                7.3.9
@schematics/update                 0.13.9
rxjs                               6.5.2
typescript                         3.4.5
webpack                            4.28.4

Upvotes: 3

Views: 4858

Answers (2)

Sen Alexandru
Sen Alexandru

Reputation: 2263

first of all you should follow the steps mentioned in the update guide https://update.angular.io/.

Also, when receiving errors such as yours, you might want to prefix the commands with --force, like

ng update @angular/core @angular/cli --force

Upvotes: 1

wentjun
wentjun

Reputation: 42526

You may need to run this command:

ng update --all --force

This sort of updates all applicable Angular packages.

As for the other 3rd party packages such as angular-calendar, you may need to manually run the npm command to update them to the versions that supports Angular 8.

When it comes to checking your 3rd party packages, you can simply run the command and it will return the list of latest versions for those packages.

npm outdated

Upvotes: 3

Related Questions