-
编辑环境配置
# 或者 vim ~/.bash_profile$ vim ~/.zshrc
-
贴入镜像
# 淘宝镜像export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/nodeexport 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....
来源地址:https://blog.csdn.net/zz00008888/article/details/132412685