You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
# download and install Node.js (you may need to restart the terminal)
nvm install 20
# verifies the right Node.js version is in the environment
node -v # should print `v20.17.0`# verifies the right npm version is in the environment
npm -v # should print `10.8.2`
但是执行第一条命令就报错:Failed to connect to raw.githubusercontent.com port 443 after 8 ms: Couldn't connect to server
官网的安装教程 https://nodejs.org/en/download/package-manager :
但是执行第一条命令就报错:
Failed to connect to raw.githubusercontent.com port 443 after 8 ms: Couldn't connect to server
解决办法:
1、https://www.ipaddress.com 查询
raw.githubusercontent.com
域名的 ip 地址。查出四条 ip 地址:2、下载SwitchHosts软件
https://github.com/oldj/SwitchHosts/releases
https://switchhosts.vercel.app
3、SwitchHosts中加入以下host
记得打开开关。
最后:
ping raw.githubusercontent.com
成功,然后执行第一条命令即可。执行完之后,发现nvm并没有生效,于是手动配置nvm:配置nvm:https://juejin.cn/post/7232499180660768829
nvm -v
成功!继续根据node官网步骤往下安装就行。
The text was updated successfully, but these errors were encountered: