npm install -g cnpm安装报错
作者:互联网
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/
标签:npm,set,cnpm,ERR,cnpmjs,报错,registry,org 来源: https://blog.csdn.net/m0_54706625/article/details/117755174