Skip to content

How to upgrade Angular CLI to the latest version

In order to update the angular-cli package installed globally in your system, you need to run:

npm uninstall -g angular-cli 
npm cache clean 
# or(if npm > 5) 
npm cache verify 
npm install -g @angular/[email protected]

Depending on your system, you may need to prefix the above commands with sudo.

Also, most likely you want to also update your local project version, because inside your project directory it will be selected with higher priority than the global one:

rm -rf node_modules 
npm uninstall --save-dev angular-cli 
npm install --save-dev @angular/[email protected] 
npm install
Published inAngularCodingFrontend

Be First to Comment

Leave a Reply

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