How to update local Angular CLI version? in package.json file using ‘ncu’ utility

In this short tutorial, we will discuss a very common question on How to keep Angular’s local and global packages updated?

When we create a new Angular project, it lists all its packages used in a separate file called package.json, giving details in JSON format about packages and their current version installed.

How to update Angular Packages?, Install the latest version of Angular CLI, How to check the latest version of packages in package.json file?

You may face following type of error/ warnings if Global and Local versions mismatch.

WARNING in ./node_modules/@angular/cdk/esm5/text-field.es5.js 146:171-179 “export ‘ɵɵinject’ was not found in ‘@angular/core’

One I faced when I installed the latest version of Angular Material with version ~8.1.1 and my Angular core was still ~7.2.0 in package.json file


After the release of the latest version of Angular, we usually update it by running following NPM command which is also there in official docs

So it updates the global version of packages which are not accessible by local projects/ directories.

When we try to create a new Angular project y running the new command as follows:

it shows this message:


This solution will also resolve the following issue:

An unhandled exception occurred: Could not find the implementation for builder @angular-devkit/build-angular:dev-server

How to update local Angular package.json to latest versions?

As a project use local node_module packages which have version listed in the package.json file. So we need to update those version to latest then run npm update command to update node_modules folder with latest packages.

To update pacakge.json to the latest version we will use a utility npm-check-updates, this checks the latest version for a package then update to the latest version number in package.json. Then we only need to run npm update to update our local node_module folder.

After running $ ncu  you can check updated versions available. Isn’t cool 😛

Notice: If you face the following issue:

ERROR in The Angular Compiler requires TypeScript >=3.4.0 and <3.6.0 but 3.6.3 was found instead.

Then install Typescript version 3.6.0 by running following NPM command:


Conclusion: Using npm-check-updates we can easily get updated versions available and in the same time also update packages locally without getting into mess to go run install commands for each package.



Leave a Reply

2 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
2 Comment authors
Timothy NunnLastDigitsOfPi Recent comment authors
newest oldest most voted
Notify of

Really useful Guide

Timothy Nunn
Timothy Nunn

Very helpful guide, thank you so much!!!