nodejs版本管理工具nvm

linux版本

  1. 安装
curl -o- https://gitee.com/Annlix/nvm-sh_nvm/raw/master/install.sh|bash
  1. 查看nodejs版本
nvm ls-remote
  1. 安装指定版本
nvm install v16.18.1
  1. 查看已装版本
nvm list
  1. 切换指定版本
nvm run node v12.20.2
  1. 指定默认版本
nvm alias default v12.20.2
  1. 卸载指定版本
nvm uninstall v12.20.2
  1. 配置国内镜像源
npm config set registry https://registry.npmmirror.com
# 或者npm install -g cnpm --registry=https://registry.npmmirror.com
  1. 安装yarn,并行nodejs包管理工具
npm install yarn -g
posted @ 2022-11-21 03:22  Eric小星  阅读(35)  评论(0编辑  收藏  举报