Open genkio opened 8 years ago
nvm use default
not stick between window to windowexport NVM_DIR="/home/bonnie/.nvm"
## If the file exists and is not empty
if [ -s "$NVM_DIR/nvm.sh" ]; then
## Source it
source "$NVM_DIR/nvm.sh"
fi
NODE_DEFAULT_VERSION=$(<"$NVM_DIR/alias/default")
export PATH="$NVM_DIR/versions/node/$NODE_DEFAULT_VERSION/bin":$PATH
Install nvm with
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
Check to see if
.nvm
exists withls -a | grep .nvm
If
.nvm
does not yet exist, try clone it from the githubgit clone http://github.com/creationix/nvm.git .nvm
Then add this line to the end of
~/.bash_profile
(~/.profile
) to fix nvm command not found issue.[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh # This loads NVM
Continue setup at #7