In this tutorial I will give you details on how you can upgrade Angular CLI 7 to Version 8.
To checkout your current version of Angular CLI, you can execute following command from your terminal or from command prompt if your on windows.
It will display the existing version you have installed on your system:
So as you can see in the above screen I have Angular CLI Version 7 currently installed, so let’s upgrade it to version 8
So to update angular-cli packages installed globally first we need to uninstall them and then clear the cache and install latest angular cli.
npm uninstall -g angular-cli
If you on Mac you need to prefix the above commands with sudo.
Also if you are getting issue running above commands on windows then Open Power-shell on windows in Administrator Mode.
npm cache verify
Use following command only if your using npm version less that or equal to 5
npm cache clean
In my case I have npm 6 so I can use npm cache verify command as showing below:
So after you have verify or clean cache depending on the npm version you use, next install latest version of angular CLI using below command:
npm install -g @angular/cli@latest
Now we have successfully installed latest version of Angular Cli, you can ensure that by using ng command showing below:
If you want to upgrade your existing Angular 7 project to Angular 8 then open up your terminal and execute following command.
Please note before executing following command you should upgrade you Angular CLI first as showing in the above steps.
ng update @angular/core
The above command will get you all the latest libraries of Angular
We are done, let me know if you get any issue while updating Angular CLI on your system using comment box below.
Also you can read about complete angular development setup for your windows, linux or mac operating system from this tutorial – Setting up Angular Development Environment
Learn How to use laravel frameworks new improved feature called Eloquent Subquery and get example of using Eloquent Subqueries and…
Learn how to use php array map function with easy and essential tutorial to modify arrays in php here I…
Learn how to use php array filter function with easy and essential tutorial to filter array in php here I…
Want to know how to refactor your Typescript class, Learn here utilising Typescript of the best and essential feature that…
What is Access Modifiers in typescript, how to use Access Modifiers, when to use them, what are the advantage of…