The Best Way To Update Angular CLI To The Most Recent Versions 7|8

How can I find the Angular CLI version?

Knowing the Angular version installed on our system is necessary before upgrading the Angular CLI. Simply execute the following command in your terminal to accomplish this.

ng --version

The version of Angular installed on your system will be shown by this command.

Install the most recent version of Angular CLI

To install the Angular CLI package on your computer globally, issue the following command.

Using Command on a Mac
sudo npm uninstall -g angular-cli
Windows users only

Users of Windows PowerShell should run the following command as Administrator.

npm uninstall -g angular-cli

This command will completely remove the angular-cli package from your computer.

Then, remember to use the command shown below to clear the cache.

sudo npm cache verify

In case your NPM version is less than 5, use the following command.

npm cache clean

You may now use the following command to reinstall the Angular CLI.

sudo npm install -g @angular/cli@latest

Try the command below if you are somehow seeing the outdated version.

ng update @angular/cli

Check your Angular CLI version by using the command below.

ng --version

Use the following command to clear the cache after upgrading both the global and local packages to get rid of any issues.

npm cache verify (suggested)
npm cache clean (usage with earlier versions of npm)
Updating Angular Packages

Use the following command in your terminal to update the essential Angular dependencies or packages.

ng update @angular/core
How is RxJS updated?

Use the Angular CLI command shown below to upgrade RxJS.

ng update rxjs

Submit a Comment

Your email address will not be published. Required fields are marked *


Select Categories