nvm 在同一台电脑上安装多个版本不同的 node

mac/linux GitHub

# 下载安装:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
或
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
# 让环境变量生效
source ~/.bash_profile

windows GitHub

下载安装:
https://github.com/coreybutler/nvm-windows/releases/download/1.1.9/nvm-setup.exe

简单使用

# 查看已经安装 node 的版本
nvm ls
# 使用特定版本的 node
nvm use 版本号
# 安装 node
# 查看哪些版本可以安装
# mac/linux
nvm ls-remote
# windows
nvm list available
# 安装
nvm install 版本号

猜你喜欢

转载自blog.csdn.net/qq_45594962/article/details/127134601