I am trying to install NVM as per these instructions
I typed in this command in terminal:
$ curl https://raw.github.com/creationix/nvm/master/install.sh | sh
After running the install, I restart the terminal and attempt to install Node.js with this command:
$ nvm install 0.8
but I get the response:
-bash: nvm: command not found
I'm not sure what I am doing wrong here.
Additional Info--
I've been looking around for solutions from other posts and forums. I found another solution using
$ git clone git://github.com/creationix/nvm.git ~/.nvm
but this times out every time I attempt that. Any help would be appreciated. Thanks.
Node Version Manager, more commonly called nvm, is the most popular way to install multiple versions of Node. js, but is only available for Mac/Linux and not supported on Windows. Instead, we recommend installing nvm-windows and then using it to install Node. js and Node Package Manager (npm).
I think you missed this step:
source ~/.nvm/nvm.sh
You can run this command on the bash OR you can put it in the file /.bashrc or ~/.profile or ~/.zshrc to automatically load it
https://github.com/creationix/nvm
Check your .bash_profile
, .zshrc
, or .profile
file. You most likely had a problem during the installation.
You should have the following at the end of one of those files.
[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh # This loads NVM
The . $HOME/.nvm/nvm.sh
is the same as source $HOME/.nvm/nvm.sh
See: Sourcing a File
You can also check to see if you have a .nvm
folder.
ls -a | grep .nvm
If you're missing that folder then the installation failed to run the git command. This could be due to being behind a proxy. Try running the following instead.
git clone http://github.com/creationix/nvm.git .nvm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With