使用nvm管理node版本
1、下载安装nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
2、加载环境变量,获取nvm命令
source ~/.bashrc
3、安装node
获取node版本:
nvm ls-remote
安装指定版本node(如8.0.0):
nvm install 8.0.0
4、使用指定版本node(如8.0.0)
nvm use 8.0.0以上版本。
网友评论