Sometimes, we want to upgrade Angular CLI to the latest version.
In this article, we’ll look at how to upgrade Angular CLI to the latest version.
How to upgrade Angular CLI to the latest version?
To upgrade Angular CLI to the latest version, we uninstall and install a few packages.
We run
npm uninstall -g @angular/cli
npm install -g @angular/cli@latest
to uninstall the current @angular/cli
package and install the latest version of it.
We can also remove everything in node_modules
and then install the latest version by running
rm -rf node_modules
npm uninstall --save-dev @angular/cli
npm install --save-dev @angular/cli@latest
npm install
Conclusion
To upgrade Angular CLI to the latest version, we uninstall and install a few packages.