-
编辑环境配置
# 或者 vim ~/.bash_profile $ vim ~/.zshrc
-
贴入镜像
# 淘宝镜像 export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node export NVM_IOJS_ORG_MIRROR=http://npm.taobao.org/mirrors/iojs# nvm环境配置 export NVM_DIR="$HOME/.nvm"[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
-
使环境配置生效
# 或者 source ~/.bash_profile $ source ~/.zshrc
-
测试使用
# 查看远程所支持的所有版本(可能比较耗时) $ nvm ls-remote# 安装指定版本(比较耗时) $ nvm install v16.0.0....