I used (and contributed to) nvm before, but imo the script got bloated. So I moved to nodenv, which is like rbenv, but for node, with shims and stuff like that. 
Now I don't have an explicit NODE_PATH, instead I just added the directory with shims to my PATH.

https://github.com/nodenv/nodenv

Verstuurd vanaf mijn iPhone

Op 28 okt. 2016 om 09:44 heeft George McGinley Smith <george@gsgd.co.uk> het volgende geschreven:

From https://github.com/creationix/nvm

nvm use will not, by default, create a "current" symlink. Set $NVM_SYMLINK_CURRENT to "true" to enable this behavior, which is sometimes useful for IDEs. Note that using nvm in multiple shell tabs with this environment variable enabled can cause race conditions.


On Fri, 28 Oct 2016 at 06:40 Allan Odgaard <mailinglist@textmate.org> wrote:

On 28 Oct 2016, at 6:49, Graham Heath wrote:

For NVM to keep multiple versions in the path it adds ~/.nvm/nvm.sh to your
.bash_profile, which interns amends the "default nvm-node path" to PATH.
Like this, `which node` will return something like
"/Users/______/.nvm/versions/node/v6.2.2/bin/node".
I could simply add that path to TM_PATH, but if node versions change,
TextMate will continue using the old version (or worse).
I’m sure some of you are running into this problem. What have you done to
solve it?

The best way to handle these things is by using symbolic links, so you would have a current link pointing to the version you wish to use, and you can add that to PATH, then no shell script is required to be executed by apps that want to access the current node.

If NVM does not provide such links, I would make it a suggestion.


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate

_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate