NVM 一键切换Node版本
Node 实用工具之 NVM,兼容多个 Node,一键切换版本。
安装
Ubuntu
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
或者
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
安装后执行 nvm,如果返回 nvm: command not found,重启终端解决。
Windows
下载地址: https://github.com/coreybutler/nvm-windows/releases
用法
查看已安装版本
nvm ls
安装新版本
nvm install 10.15.3
切换 node 版本
nvm use 10.15.3