npm update
seems to just update the packages in dependencies
, but what about devDependencies
.
Right now you can install devDependencies
by running npm install .
, but this doesn't work for npm update .
Any ideas?
npm update
seems to just update the packages in dependencies
, but what about devDependencies
.
Right now you can install devDependencies
by running npm install .
, but this doesn't work for npm update .
Any ideas?
I ran into the same problem as OP had, and found no solution, so I decided to write a Grunt plugin that will auto-update my devDependencies..
It's on Github, I'd love to get some input and collaborations in order to make it the best tool that NPM hasn't provided.
Basically it will auto-update your outdated development dependencies with a simple Grunt Task.
https://github.com/pgilad/grunt-dev-update
What worked for me is installing individual dev dependencies like this
Install npm-check-updates (https://www.npmjs.org/package/npm-check-updates), then jump into your project folder and run:
And to update and save changes to your package.json file:
To update package.json in addition to the local modules, run
Alternatively, the same command to save time
You can view the full detail of update, or any command for that matter through
If you are using outdated npm version it might be the problem. So before any other commands execute:
or (if above doesn't work):
Then relaunch the console (in order for changes to take effect). Now you can check your new
npm --version
and if it is up to date execute:or (if you prefer):
One (slow) way to do force the update, is to remove the node_modules directory, and then do
npm install
again.This was a known bug of the
npm update
command, which has been fixed on the development branch ofnpm
, see here: https://github.com/isaacs/npm/pull/3863It should land on the latest stable version of npm pretty soon.