Linux 安装 nvm
网上用curl命令安装的方式都下载不成功,直接使用压缩包安装
#######
wget https://github.com/nvm-sh/nvm/archive/refs/tags/v0.39.1.tar.gz
mkdir -p /root/.nvm
tar xvf nvm-0.39.1.tar.gz -C /root/.nvm
#######vi ~/.bashrc,在~/.bashrc的末尾,添加如下语句
export NVM_DIR="$HOME/.nvm/nvm-0.39.1"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
#######配置生效
source ~/.bashrc
- 安装pnpm
npm install -g pnpm
- npm pnpm设置国内镜像
npm config set registry https://registry.npmmirror.com
pnpm config set registry https://registry.npmmirror.com