You can install Node Version Manager using git, curl or wget. You run these commands in Terminal on Mac OSX.
curl example:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash
wget example:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash
To test that nvm was properly installed, close and re-open Terminal and enter nvm
. If you get a nvm: command not found message, your OS may not have the necessary .bash_profile file. In Terminal, enter touch ~/.bash_profile
and run the above install script again.
If you still get nvm: command not found, try the following:
nano .bashrc
. You should see an export script almost identical to the following:export NVM_DIR=”/Users/johndoe/.nvm” [ -s “$NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh”
nano .bash_profile
to open the Bash Profilenano .bashrc
to re-open the .bashrc filesource ~/.nvm/nvm.sh
nvm
to test if it's working