How to Upgrade Angular 6 to Angular 8 Version For New Projects

Updated on: February 24, 2021

Angular 8 Requirements:

Node.js Version Required for Angular 8: 10.9.0 or later 

Typescript Version Required for Angular 8: Typescript 3.4+

Angular CLI Version Required for Angular 8: 8.0 or later

Follow the following steps to upgrade your Angular 2+ version to latest version

1.) Upgrade Node.js to Latest Version from: https://nodejs.org/en/download/  

it will download msi file, you need to install it on your machine to upgrade Node.js to latest version. Once finished with the Node.js installation you can check the latest version of Node.js from following command: node -v

You can see on our machine, we have upgraded Node.js to latest 12.9.0 version.

2.) Upgrade Angular CLI version by running following command: npm install -g @angular/cli

Once latest Angular CLI is installed, you can check the version of it by running following command: ng version

Please note: Previously in older Angular CLI version we used to run ng -v for getting the Angular CLI version, but now this has changed to ng version command to check the version of Angular CLI.

You can see we have upgraded Angular CLI to Version 8.2.2

3.) Upgrade typescript version to 3.4 or later by running following command: npm install -g typescript 

Once Typescript is upgraded to latest version, you can check the version by running the following command: tsc -v

4.) Create new Angular 8 Project by running following command on Node.js Command Prompt: ng new TestApp2

Here, we are creating new Angular 8 App which will be named as "TestApp2".

5.) Once Angular 8 App is created, you can open it in Visual Studio Code by running the following command: code .

6.) You can run this Angular 8 project by running following command: ng serve -o

7.) The App will run in your default browser, you can check from the following screenshot, it is running on Angular 8.2.3 Version