vue用npm install时报错时出现:
npm ERR! request to https://registrypmjs/wangeditor failed, reason: Hostname/IP does not match certificate's altnames: Host: registrypmjs. is not in the cert's altnames: DNS:rpmjs
是因为本地taobao镜像不可用需要还原节点。
当然你用cnpm install可能也是不可以的。
解决办法比较复杂,小编认为是本地电脑自定义配置时设置的一种保护电脑的机制(仅供参考)
解决办法是重新安装,从根部解决
1、执行:
npm config get proxy
npm config get https-proxy
如果返回值不为null,继续执行:
注意:要确保两个返回值都是null才可以,否则就要执行下面的代码
npm config set proxy null
npm config set https-proxy null
2、执行:
npm config set registry http://registrypmjs/
3、重新安装
npm install -g cnpm --registry=https://registry.npm.taobao
这只是其中的一种方法,每种错误的方式是不一样的。
如果你有更好的方法记得与我分享呦
记得点赞呦,不然会报错的,哈哈哈!
更多推荐
解决报错npm ERR request to https://registry.cnpmjs.org/wangeditor failed, reason: Ho
发布评论