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/
相关推荐
于慨1 天前
Capacitor
前端
IT凝冬1 天前
liunx 的 centos7 安装ngin
前端
赵锦川1 天前
大屏比例缩放
前端·javascript·html
于慨1 天前
tauri
java·服务器·前端
贼爱学习的小黄1 天前
NC BIP参照开发
java·前端·nc
小江的记录本1 天前
【MyBatis-Plus】MyBatis-Plus的核心特性、条件构造器、分页插件、乐观锁插件
java·前端·spring boot·后端·sql·tomcat·mybatis
光影少年1 天前
如何进行前端性能优化?
前端·性能优化
Dxy12393102161 天前
js如何把字符串转数字
开发语言·前端·javascript
爱写bug的野原新之助1 天前
爬虫之补环境:加载原型链
前端·javascript·爬虫
陈广亮1 天前
工具指南7-Unix时间戳转换工具
前端