1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| wget -c https://github.com/nvm-sh/nvm/archive/refs/tags/v0.39.5.tar.gz tar zxf v.0.39.5.tar.gz mkdir /usr/local/nvm mv nvm-0.39.5 /usr/local/nvm/
vim ~/.bashrc
#以下路径/usr/local/nvm/nvm-0.39.5为nvm安装路径 export NVM_DIR="/usr/local/nvm/nvm-0.39.5" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # nodejs下载更换淘宝镜像(从淘宝镜像下载还是很慢,很奇怪) # 下载慢问题已找到原因:服务器资源太少导致 export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
nvm install v16.20.2 nvm use v16.20.2 npm config set registry https://registry.npmmirror.com
|