The problem is that you need nvm
to be automatically sourced upon login, so either add the following line to your ~/.bashrc
or ~/.profile
file.
[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh
Also nvm
doesn't set any version of node automatically so if you just installed nvm
and installed a node version and try to use node
the next time you login, you get an error that command not found: node
unless you use the nvm use versionnumber
command in every terminal session, so Instead I suggest you to set a default alias so that a default version of node is active for every terminal session using the following command
nvm alias default versionnumber
PS: In the above commands version number denotes the version number of nodejs
that you have already installed using nvm
nvm install 0.8
. – Eric Carvalho Mar 18 '13 at 23:21