Before you go, check out these stories!

Hackernoon logoCheck for npm modules updates easily by@hendrysadrak

Check for npm modules updates easily

Author profile picture

@hendrysadrakHendry Sadrak

If you are a yarn user, running yarn upgrade-interactive is the one built-in command that makes your life super easy. But no, this article is meant for the hardcore npm users.

When using npm there is a built-in tool to check for dependencies updates too. npm outdated shows you list of outdated packages.

npm outdated inย action

But there is a better tool for that! Using npm-check-updates to check for updates and updating your package.json is a no-brainer.

npm-check-updates is a command-line tool that allows you to upgrade your package.json or bower.json dependencies to the latest versions, regardless of existing version constraints.


npm install -g npm-check-updates


$ ncu
nuxt           ^1.0.0  โ†’  ^2.2.0
node-sass ^4.9.2 โ†’ ^4.9.4
vue-scrollto ^2.11.0 โ†’ ^2.13.0
Run with -u to upgrade your package.json

Well, wasn't that easy? It shows which packages have updates and using the flag -u it automatically replaces the version in package.json.

Edited 19 Oct 2018 - Updated the article with new images and up to date information.


Join Hacker Noon

Create your free account to unlock your custom reading experience.