解决报错npm ERR request to https://registry.cnpmjs.org/wangeditor failed, reason: Hostname/

编程知识 更新时间:2023-05-02 21:16:36

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

本文发布于:2023-04-28 17:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/ec4dcf1e3a98378d63bf9da4ed2b1943.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   request   https   ERR   registry

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 109284文章数
  • 27730阅读数
  • 0评论数