Paddyfink
Paddyfink

Reputation: 37

How to upgrade Angular from V6 to V7 when the latest version is V8?

Usually, I upgrade Angular to the latest version but I have an old app in v6 that I would like to upgrade first to V7 first (which is not the latest).

The Angular documentation is not very clear:

  • Update to V7 of the core framework and CLI by running ng update @angular/cli @angular/core in your terminal.
  • Update to V8 of the core framework and CLI by running ng update @angular/cli @angular/core in your terminal

However ng-update always tries to update to the latest version.

Upvotes: 3

Views: 485

Answers (2)

Kyle Krzeski
Kyle Krzeski

Reputation: 6527

Follow the guide on upgrade.angular.io. You can set your current and desired version to whatever you want it to be. For 6.0 to 7.0 these are the steps at the very minimum:

  1. npm install -g rxjs-tslint
  2. rxjs-5-to-6-migrate -p src/tsconfig.app.json
  3. ng update @angular/cli @angular/core

Upvotes: 0

Flignats
Flignats

Reputation: 1274

ng update @angular/[email protected] -- or whichever version you want to install.

You can also go into the package.json and update the core to the specific version you want and run npm install

Upvotes: 1

Related Questions