npm ERR!

作者: 1994陈 | 来源:发表于2020-06-10 14:04 被阅读0次
npm ERR! request to https://registry.npmjs.org/express-messages failed, reason: Hostname/IP doesn't 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"

解决办法:

npm config get proxy
npm config get https-proxy

如果不返回null,则设置为null

npm config get proxy null
npm config get https-proxy null

执行

npm config set registry http://registry.cnpmjs.org/

编辑c盘下的.npmrc文件,将registry的值修改为:

registry = http://registry.cnpmjs.org

相关文章

网友评论

    本文标题:npm ERR!

    本文链接:https://www.haomeiwen.com/subject/liryahtx.html