首页 前端知识 npm ERR! request to https://registry.npm.taobao.org/yallist failed, reason: certificate has expired

npm ERR! request to https://registry.npm.taobao.org/yallist failed, reason: certificate has expired

2024-05-23 20:05:03 前端知识 前端哥 904 104 我要收藏

npm ERR! request to https://registry.npm.taobao.org/yallist failed, reason: certificate has expired异常解决

1.问题描述

今天在对ohpm进行初始化的时候显示这样的一条信息
在这里插入图片描述
npm ERR! request to https://registry.npm.taobao.org/yallist failed, reason: certificate has expired

原因是 :npm的淘宝镜像地址https://registry.npm.taobao.org/yallist失败,证书已过期

2.解决方式

修改Dockerfile构建指令,配置新的 registry ,将过期的地址改新地址:https://registry.npmmirror.com

1、cmd命令中输入“npm config get registry”:查看npm源地址

2、cmd命令中输入“npm config set registry https://registry.npmmirror.com”:设置新下载地址

3、设置好后,在cmd命令中输入“npm config get registry”,确认是否更改成功。

在这里插入图片描述

3.修改效果

当我再次对ohpm初始化时成功完成初始化操作
在这里插入图片描述
解决!

转载请注明出处或者链接地址:https://www.qianduange.cn//article/9205.html
标签
评论
发布的文章

用JS生成本周日期代码

2024-04-18 17:04:15

js 递归函数

2024-05-31 10:05:46

jQuery是什么?如何使用?

2024-03-12 01:03:24

js延迟加载的六种方式

2024-05-30 10:05:51

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!