npm ERR! code CERT_HAS_EXPIRED npm ERR! errno CERT_HAS_EXPIRED

文章目录

1.问题复现

npm i 一个东西报错 ,如果报错信息是下面的

shell 复制代码
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/@huolala-tech%2fpage-spy-api failed, reason: certificate has expired

2.解决方案

1.第一种

shell 复制代码
#清除npm缓存
npm cache clean --force
#取消ssl证书验证
npm config set strict-ssl false

2.第二种

shell 复制代码
#清除npm缓存
npm cache clean --force
#更换官方的registry
npm config set registry https://registry.npmjs.org/
相关推荐
烛阴4 分钟前
Python枚举类Enum超详细入门与进阶全攻略
前端·python
孟孟~7 分钟前
npm run dev 报错:Error: error:0308010C:digital envelope routines::unsupported
前端·npm·node.js
孟孟~9 分钟前
npm install 报错:npm error: ...node_modules\deasync npm error command failed
前端·npm·node.js
狂炫一碗大米饭11 分钟前
一文打通TypeScript 泛型
前端·javascript·typescript
wh_xia_jun21 分钟前
在 Spring Boot 中使用 JSP
java·前端·spring boot
二十雨辰40 分钟前
[HTML5]快速掌握canvas
前端·html
tingkeiii1 小时前
【react+antd+vite】优雅的引入svg和阿里巴巴图标
前端·react.js·前端框架
清幽竹客1 小时前
vue-18(使用 Vuex 插件实现高级功能)
前端·vue.js·前端框架·vue
粥里有勺糖2 小时前
用Trae做了个公众号小工具
前端·ai编程·trae
棉花糖超人2 小时前
【从0-1的HTML】第2篇:HTML标签
前端·html