How do I update devDependencies in NPM?

These steps worked for me :

  1. npm install -g npm-check-updates
  2. ncu -u
  3. npm update
  4. npm install

To update package.json in addition to the local modules, run

npm update --save-dev

Alternatively, the same command to save time

npm update -D

You can view the full detail of update, or any command for that matter through

npm help <cmd>

Install npm-check-updates (https://www.npmjs.org/package/npm-check-updates), then jump into your project folder and run:

npm-check-updates

And to update and save changes to your package.json file:

npm-check-updates -u

Tags:

Node.Js

Npm