mac nvm的安装地址
https://github.com/nvm-sh/nvm/blob/master/README.md
raw.githubusercontent.com 连接失败
在 https://site.ip138.com/raw.Githubusercontent.com/ 查询raw.githubusercontent.com的ip 地址,
修改hosts 文件
输入安装命令
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
nvm -v. 成功会出现版本
nvm list. 列出所有的node版本
nvm install node@v8 安装版本
nvm use node@v8. 使用版本
同时修改本机终端 和vscode 终端 里的的node 版本
nvm alias default v8