V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
AnLuoRidge
V2EX  ›  Node.js

npm 服务器的证书好像出问题了

  •  
  •   AnLuoRidge · 2018-09-01 21:17:54 +08:00 · 7874 次点击
    这是一个创建于 2034 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我 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 也会报证书问题。我试了下,真的是……

    4 条回复    2018-09-02 21:37:41 +08:00
    wdlth
        1
    wdlth  
       2018-09-01 22:25:52 +08:00
    我这返回的是 CloudFlare 的 IP 地址,没有出现证书错误。
    Binarization
        2
    Binarization  
       2018-09-01 23:00:50 +08:00
    是的,CDN 证书错了。
    AnLuoRidge
        3
    AnLuoRidge  
    OP
       2018-09-02 10:32:06 +08:00
    嗯,现在修复了~
    cstome
        4
    cstome  
       2018-09-02 21:37:41 +08:00
    有没有想过,哪天 NPM 之类的不再维护了,无法 npm install, 你写的 Node 程序也都没用了?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5429 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 08:43 · PVG 16:43 · LAX 01:43 · JFK 04:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.