Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading Angular 6 to Angular 7 beta [closed]

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?

like image 759
Ap0st0l Avatar asked Sep 14 '18 10:09

Ap0st0l


People also ask

How do I upgrade ng to a specific version?

How do I upgrade ng to a specific version? ng updatelink To update to the next beta or pre-release version, use the –next=true option. To update from one major version to another, use the format ng update @angular/cli@^ @angular/core@^ .

Can we upgrade Angular version in project?

Upgrade Angular CLI globally The Angular CLI is installed on global level as well as on project level. If you upgrade Angular CLI version inside Angular project then it shall update only project's Angular CLI version. The global Angular CLI version can be upgraded by removing previous version and installing newer one.

How do I upgrade from Angular 11 to project 12?

Update to the new versionRun ng update @angular/core@12 @angular/cli@12 which should bring you to version 12 of Angular. Angular now requires TypeScript 4.2. ng update will update you automatically. IE11 support has been deprecated.


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/

like image 117
Ap0st0l Avatar answered Sep 26 '22 03:09

Ap0st0l