
我 npm install 的时候,一直报:
Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ERR_TLS_CERT_ALTNAME_INVALID: request to https://registry.npmjs.org/react-scripts failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net
搜了下 SO,发现不少人都在问,比如这贴:NPM not installing package. Hostname/IP doesn't match certificate's altnames:
底下有人回复说,浏览器访问 https://registry.npmjs.org/http-server 也会报证书问题。我试了下,真的是……
1 wdlth 2018-09-01 22:25:52 +08:00 我这返回的是 CloudFlare 的 IP 地址,没有出现证书错误。 |
2 Binarization 2018-09-01 23:00:50 +08:00 是的,CDN 证书错了。 |
3 AnLuoRidge OP 嗯,现在修复了~ |
4 cstome 2018-09-02 21:37:41 +08:00 有没有想过,哪天 NPM 之类的不再维护了,无法 npm istall, 你写的 Node 程序也都没用了? |