Upgrading Angular 6 to Angular 7 beta

Viewed 2358

I have existing project with Angular 6. I want it to be upgraded to version 7 beta, if it is possible, with Ivy renderer enabled.

What are the steps to do it correctly?

1 Answers

Ok, so no one helped, I will write the solution I found myself.

  1. (optional) If you use NVM, you can install the latest node.js in the first place and switch to it, to avoid possible problems
  2. Install the beta angular/cli in version 7, globally and locally in the project
  3. In package.json replace all occurrences with the current version of your Angular (e.g. 6.1.7) with ^7.0.0-beta.5
  4. npm install
  5. If there are problems delete node_modules and try again npm install

If you want to be sure, that your other packages are in latest versions, you can install empty Angular 7 application somewhere else with beta angular/cli and check what changed in package.json. Unfortunately Angular team doesn't provide a tool to install desired version of Angular, but beta cli installs Angular 7 by default.

As for Ivy renderer it's not default in Angular 7 beta. I tried to manually enable it and it didn't work. It seems this project needs a lot more work to be finished yet and there's little information on the internet how to properly use it in advanced project (there are only some very simple tutorials for empty projects).

Ivy renderer status: https://is-angular-ivy-ready.firebaseapp.com/#/status https://github.com/angular/angular/blob/master/packages/core/src/render3/STATUS.md

Ivy renderer tutorial: https://blog.imaginea.com/ivy-a-look-at-the-new-render-engine-for-angular/

Related