blog.robino.dev


Interactively Update NPM Dependencies

Keeping up with your project's dependencies can be difficult and time consuming. Here's the best way I've found to keep up with them.

Sep 12, 2022

Ross Robino



Update your dependencies with two commands

Keeping up with a project’s dependencies can be difficult and time consuming. After trying a variety of methods, here’s the best way I’ve found to manage npm dependencies.

Install npm-check-updates globally

Run this command to install the npm-check-updates package:

npm install -g npm-check-updates

This allows the use of ncu regardless of whether it’s installed in the project directly.

Update project

Run this command from the workspace folder to start the interactive process:

ncu --interactive --format group

Process

  • update all patch/minor updates, test
  • update each major update independently, test

References

Find an error in this post? Any updates are appreciated. Edit this post