Upgrade Your Angular CLI to Latest Version (@angular/cli v9)

Angular CLI is a command line interface tool for Angular, it is able to create a Angular project, add files, run and build Angular app, etc.

In this post we will show you how to upgrade your @angular/cli from an old version to latest version. Let’s follow the following steps to upgrade your @angular/cli.

1. Remove your old version of @angular/cli

Run the following command to remove the current @angular/cli from your machine:

npm uninstall -g @angular/cli

 

 2. Install the latest version of @angular/cli

Run the following command to install the latest version of @angular/cli in your machine:

npm install -g @angular/cli@latest

 

 3. Verify version of @angular/cli

After you have run the above steps to upgrade your @angular/cli, you need to verify version of @anguar/cli to ensure that you did it right.

Now let’s run the following command to verify it:

ng version

Here is result from my machine, it can be different from yours.

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 9.0.6
Node: 10.16.0
OS: win32 x64

Angular:
...
Ivy Workspace:

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.900.6
@angular-devkit/core         9.0.6
@angular-devkit/schematics   9.0.6
@schematics/angular          9.0.6
@schematics/update           0.900.6
rxjs                         6.5.3

If you want to know available commands of @angular/cli, you can run this command:

ng help

That’s all! Thanks for reading the post, if you have any questions, please comment in the below form.

Leave a Reply

avatar