Here's the part of my package.json
:
{
...
"devDependencies": {
"gulp": "~3.8",
...
},
...
}
I'm running the following commands:
gulp --version
CLI version 3.8.7
Local version 3.8.6
npm update
gulp --version
CLI version 3.8.7
Local version 3.8.6
rm -Rf ./node_modules/
npm install
gulp --version
CLI version 3.8.7
Local version 3.8.7
The npm update
command has no effect.
It's only after I manually delete the node_modules
directory and run npm install
development packages are updated. What is the reason for this? Is it possible to actually update development packages without such a hassle?
Just run the following command to update the devDependencies.
npm update
Edited, If above command does not work then try to use following.
npm update -D
OR
npm update --save-dev
I'm not sure why the previous answer receives upvotes if the OP mentioned that npm update
did not work for him.
I have recently stumbled upon the same problem, in particular running npm update -g
did not have any effect on my devDependecies
in package.json
file.
I gave a go to npm-check-updates package by running npm install npm-check-updates -g
.
To see outdated dependencies run ncu
. Then run ncu -u
to update all the dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With