nvm

NVM 安装

1
2
3
4
5
6
7
8
9
10
11
12
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
# .bash_profile
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

# 查看本地所有node版本
nvm list

# 安装node
nvm install v8.12.0
# 切换node版本
nvm use 8.12.0
You can support me