Upgrade Angular CLI older versions to Angular CLI 8

Being the latest version of Angular, Angular 8 can be upgraded from an older version of Angular. To update the Angular’s version to Angular 8, from an older version, use the below steps:

Step 1: Check the current version of Angular CLI.

Command: ng –version

Here, we are using Angular 7, and we need to update it to Angular 8.

Step 2: Uninstall the older version of Angular.

Command (For Windows Open Powershell in Administrator Mode):

npm uninstall -g angular-cli

Command (For Mac):

sudo npm uninstall -g angular-cli

Step 3: Verify and clear the cache.

Command 1: npm cache verify

Command 2: npm cache clean

Step 4: Install the latest Angular CLI, i.e, Angular 8.

Command: npm install -g @angular/cli@latest

Step 5: Verify that the Angular 8 CLI is now installed in the system.

Command: ng –version

Angular 8 is thus installed in the system.

Update Angular Packages:

For the projects that are created in the older version of the Angular, we need to go inside that folder to update that package.

Command: ng update @angular/core

The cache should be cleared, after updating both the local and global packages to avoid any error.


Please Share