Nvm: Migrating global modules to new installation of node

Created on 19 Dec 2014  ·  3Comments  ·  Source: nvm-sh/nvm

Suppose I've node v0.10.32, nvm install 0.10.32, and I have global packages for that environment, for example I install express-generator, nodemon, pm2, etc in 0.10.32

I want upgrade from 0.10.32 to 0.10.34, after I install 0.10.34, and I use nvm use 0.10.34, why I can't use express-generator or nodemon anymore? Why I should install all again?

Is there a simplistic way to do such thing?

Most helpful comment

The option has been renamed to reinstall-packages, please use that instead :-)

341 tracks the issue that non-npm modules don't really work with this method, and will involve adding a new option that actually _copies_ over modules instead of reinstalling them.

I'm closing this issue, because nvm isn't meant to be used to have a single globally installed version of node, it's meant to manage multiple ones, so global modules are your responsibility to manage. You may be thinking of https://www.npmjs.com/package/n for that.

All 3 comments

oh sorry I didn't read copy-packages

But It's not resolve this Issue, rather than re-installation of global modules, it takes more time

The option has been renamed to reinstall-packages, please use that instead :-)

341 tracks the issue that non-npm modules don't really work with this method, and will involve adding a new option that actually _copies_ over modules instead of reinstalling them.

I'm closing this issue, because nvm isn't meant to be used to have a single globally installed version of node, it's meant to manage multiple ones, so global modules are your responsibility to manage. You may be thinking of https://www.npmjs.com/package/n for that.

Was this page helpful?
0 / 5 - 0 ratings