DEV Community

Nuno Cruz
Nuno Cruz

Posted on

πŸ’‘How to update your npm dependencies easily 🏎

In large projects with many dependencies it is sometimes hard to track which dependencies are outdated or not. Whenever you need to update them, the npm-check tool can help you with that.

This tool has an interactive mode that can be run with:

npx npm-check -u
Enter fullscreen mode Exit fullscreen mode

The tool interactive mode looks like this:
Tool interactive mode

Then you just need to use the up/down arrow keys to navigate between the packages and use the space bar to select those that you want to update. In the end, just press enter to update and install the previously selected packages.

Besides listing outdated libraries, it also adds a link to the package documentation, which is very useful to quickly access the release notes to check the migration guides.

Please check the tool documentation for extra options.

Top comments (2)

hozefaj profile image

For bigger projects, I would recommend using an automated service like renovate or greenkeeper.

I have seen that will projects that have a large dependency tree, manual upgrading does not scale. This is something that can(and should) be automated.

nunoancruz profile image
Nuno Cruz

Totally agree with you Hozefa. In large projects it makes sense to spend some initial time automating these tasks.
Thanks for pointing it out πŸ‘