1

I've installed node version manager (NVM) and with that installed node.js v0.10.26. However, when I open a new terminal window node, npm, etc. are unavailable until I define a node version like so: "nvm use 0.10".

I'm assuming this is a $PATH issue, but I'm not really sure. How do I configure nvm so that I don't need to define the node.js version on every new terminal window.

Here's my .bash_profile:

export PATH="/Applications/MAMP/bin:/Applications/MAMP/Library/bin:$(find /Applications/MAMP/bin/php -type d -name "php5.4*" | sort | tail -1)/bin:$PATH"

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export PATH=/usr/local/bin:$PATH

[ -s "/Users/tylermoore/.nvm/nvm.sh" ] && . "/Users/tylermoore/.nvm/nvm.sh" # This loads nvm
Commodore Timo
  • 267
  • 2
  • 12
  • Possible duplicate of [nvm keeps "forgetting" node in new terminal session](http://stackoverflow.com/questions/24585261/nvm-keeps-forgetting-node-in-new-terminal-session) – GrandOpener Dec 01 '15 at 15:59

1 Answers1

0

As I suspected this was a $PATH issue. I added:

/Users/[username]/.nvm/v0.10.26/bin

to my $PATH and all is good in the world now.

Commodore Timo
  • 267
  • 2
  • 12
  • This doesnt seem to be very sustainable. You really wanna add a path entry for each version? – frhd Jul 05 '14 at 09:36
  • I had the same problem. I also used nvm. But tell me this, can you even use npm to install ANYTHING locally(without the -g flag)? I get lots of errors like this guy - http://stackoverflow.com/questions/25050854/nvm-installed-node-and-npm-symlink-issue-when-installing-local-browserify – aquagremlin Oct 30 '14 at 02:34