npm 下载bug ERR! code ERR_TLS_CERT_ALTNAME_INVALID

在这里插入图片描述

npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.cnpmjs.org/echarts failed, reason: Hostname/IP does not match certificate's altname
s: Host: registry.cnpmjs.org. is not in the cert's altnames: DNS:r.cnpmjs.org

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\AppData\Roaming\npm-cache\_logs\2020-06-14T13_36_10_807Z-debug.log

我在npm install echarts --save的时候报出了上述错误
解决方法:npm config set strict-ssl false
最后成功下载
在这里插入图片描述

你可能感兴趣的:(debug)