On my way setting up Node.js
with NVM
, I stumbled upon an error when using Yeoman
. I got
the error
Cannot find module 'yeoman-generator'
After some research I found this post on StackOverflow, which is also about my problem. Now I tried to do so, but the problem I have is, that I want to use different versions of Node.js over the system with the use of NVM. Now is it possible to change the $NODE_PATH dynamically, if the Node.js version changes with the help of NVM? Because my $NODE_PATH is empty at the moment (this is causing the problem).
$ which node
/Users/dschmidt/.nvm/v0.10.35/bin/node
$ which npm
/Users/dschmidt/.nvm/v0.10.35/bin/npm
$ echo $NODE_PATH
[empty]
Would be glad about every answer I get about this. I searched the web for this, but could not find one post about this specifically.
question from:
https://stackoverflow.com/questions/27876557/node-js-configuring-node-path-with-nvm 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…