今天想用nvm切换node的版本的时候,发生了以下的错误
C:\Windows\system32>nvm list available Could not retrieve https://npm.taobao.org/mirrors/node/index.json. Get "https://npm.taobao.org/mirrors/node/index.json": x509: certificate has expired or is not yet valid:
复制
上网查发现淘宝的镜像源改名了。。。。
变成下面这个
PS D:\graduation-design-front-end> npm config get registry https://registry.npmmirror.com/
复制
因此使用nvm的时候会报上面的错误,因此呢我们需要找到nvm的下载目录,里面有个setting.txt的文件,以前使用的镜像是这个
node_mirror: https://npm.taobao.org/mirrors/node/ npm_mirror: https://npm.taobao.org/mirrors/npm/
复制
现在改为以下内容
node_mirror: http://npmmirror.com/mirrors/node/ npm_mirror: http://registry.npmmirror.com/mirrors/npm/
复制
现在可以重新使用nvm了
C:\Windows\system32>nvm list available | CURRENT | LTS | OLD STABLE | OLD UNSTABLE | |--------------|--------------|--------------|--------------| | 21.7.1 | 20.11.1 | 0.12.18 | 0.11.16 | | 21.7.0 | 20.11.0 | 0.12.17 | 0.11.15 | | 21.6.2 | 20.10.0 | 0.12.16 | 0.11.14 | | 21.6.1 | 20.9.0 | 0.12.15 | 0.11.13 | | 21.6.0 | 18.19.1 | 0.12.14 | 0.11.12 | | 21.5.0 | 18.19.0 | 0.12.13 | 0.11.11 | | 21.4.0 | 18.18.2 | 0.12.12 | 0.11.10 | | 21.3.0 | 18.18.1 | 0.12.11 | 0.11.9 | | 21.2.0 | 18.18.0 | 0.12.10 | 0.11.8 | | 21.1.0 | 18.17.1 | 0.12.9 | 0.11.7 | | 21.0.0 | 18.17.0 | 0.12.8 | 0.11.6 | | 20.8.1 | 18.16.1 | 0.12.7 | 0.11.5 | | 20.8.0 | 18.16.0 | 0.12.6 | 0.11.4 | | 20.7.0 | 18.15.0 | 0.12.5 | 0.11.3 | | 20.6.1 | 18.14.2 | 0.12.4 | 0.11.2 | | 20.6.0 | 18.14.1 | 0.12.3 | 0.11.1 | | 20.5.1 | 18.14.0 | 0.12.2 | 0.11.0 | | 20.5.0 | 18.13.0 | 0.12.1 | 0.9.12 | | 20.4.0 | 18.12.1 | 0.12.0 | 0.9.11 | | 20.3.1 | 18.12.0 | 0.10.48 | 0.9.10 |
复制