Bob Bob - 3 months ago 19
Node.js Question

How to update node with nvm

I've installed node.js version 5.0 with

nvm
, but now I want to update it to 5.4.

Is there no way to upgrade
node
right in place, instead of installing the latest stable version? I don't want to lose all those global packages and say
npm install grunt-cli bower yo yoman-angular-generator blablablablablabla...

Answer

This should work:

nvm install NEW_VERSION --reinstall-packages-from OLD_VERSION

then, if you want, you can delete your previous version with:

nvm uninstall OLD_VERSION

Where, in your case, NEW_VERSION = 5.4 OLD_VERSION = 5.0