I love nvm and npm. However, whenever I switch to a new version of node with nvm I have to reinstall all my global npm modules. Apparently the global modules are stored in the node directory which is created anew.
Is my setup normal? Is there a way around this problem?
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
I used to do something like this...
Install global modules to a version-agnostic /use/local/share/node_modules and always export NODE_PATH (or similar).
But what I found is that I ended up chasing breaking changes when updating node anyway. So I have jumped on the wagon and now the only thing I install globally is express. And I am so anxious about adapting to express 3...
I love nvm and npm. However, whenever I switch to a new version of node with nvm I have to reinstall all my global npm modules. Apparently the global modules are stored in the node directory which is created anew.
Is my setup normal? Is there a way around this problem?
Don't I have to install coffee-script globally to be able to use the `coffee` as a command anywhere? Same with node-dev, node-inspector, etc.
```
nave use foo 0.6.9
# installs node v0.6.9, links it into a named env "foo"
npm install -g glob
npm ls -g
# shows glob there.
# work work work
# time goes by
# from the outside:
nave use foo 0.6.13
# upgrades foo to use 0.6.13 instead
# enters foo
npm ls -g
# glob is still there!
# compiled modules may be broken and require a `npm rebuild -g` though
```