错误信息:
connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Error while downloading https://github.com/npm/cli/archive
panic: runtime error: invalid memory address or nil pointer dereference

解决方法:
设置 nvm node 的镜像:
nvm node_mirror https://npm.taobao.org/mirrors/node/

设置nvm npm 的镜像:
nvm npm_mirror https://npm.taobao.org/mirrors/npm/

3.再次使用nvm下载所需版本(我这选择16.19.0)

安装成功
使用该版本:nvm use 16.19.0(输入你安装的版本号)

并检查该版本下对应的node 和 npm 是否安装成功
检查node版本:node -v
检查npm版本:npm -v
