官方github
GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
配置代理
vim ~/.nvm/nvm.sh
添加:
export NVM_NODEJS_ORG_MIRROR=https://mirrors.aliyun.com/nodejs-release/
安装node
nvm install 20.10.0
nvm use 20.10.0
nvm alias default 20.10.0 # 默认使用20