npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.cnpmjs.org/cnpm failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.cnpmjs.org. is not in the cert's altnames: DNS:r.cnpmjs.org
解决办法:
- 先清除掉以前的代理设置
npm config set proxy null
npm config set https-proxy null
- 重新设置
npm config set registry http://registry.cnpmjs.org/