Running npm update updates items listed in package.json; however, the dependencies of those items are still outdated.
The obvious workaround is to run npm update once more. Sometimes I need to run it 3+ times to have clean npm outdated. Is there a flag in npm update to perform a deep update?
Another extreme workaround is to reinstall
rm -rf node_modules
npm install
Update
It has bee 5 years, and I am still running the code above with the addition of rm package-lock.json when I really need to shake it. Seeing "red lines" in npm out output after npm up is no longer a problem.
As an ugly workaround I have this function defined in my ~/.bash_profile
function up {
npm remove --save "$1";
npm install --save "$1";
}
So whenever I want to update a dependency I just run up express or up yourFavoritePackage
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