How to update all the NodeJS npm Packages to latest version together?

You can update all your npm packages with a few commands that I gonna show you today. In the NodeJS projects, you’ll have to update your package dependencies frequently.

Step 1. Install the ncu tool globally

$ npm install -g npm-check-updates

Step 2. Checking updates with ncu

$ ncu

Step 3. Upgrade the packages to its latest major versions

$ ncu --upgrade

Step 4. Install the updated package version using npm install

$ npm install

That’s it. Simple and Clean upgrade.

Leave a Reply

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