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
网友评论