npm install CERT_HAS_EXPIRED解决方法

目录


一、问题描述

执行命令 npm install 报错:

bash 复制代码
npm WARN registry Unexpected warning for https://registry.npm.taobao.org/: Miscellaneous Warning CERT_HAS_EXPIRED: request to https://registry.npm.taobao.org/js-cookie failed, reason: certificate has expired
npm WARN registry Using stale data from https://registry.npm.taobao.org/ due to a request error during revalidation.
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/js-beautify failed, reason: certificate has expired

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Program Files\nodejs\node_cache\_logs\2024-04-19T07_52_13_111Z-debug.log

二、问题原因

证书过期。

三、解决方法

临时忽略 SSL 证书校验:

bash 复制代码
npm set strict-ssl false
相关推荐
广州华水科技15 分钟前
单北斗GNSS在桥梁形变监测中的应用与技术进展分析
前端
我讲个笑话你可别哭啊16 分钟前
鸿蒙ArkTS快速入门
前端·ts·arkts·鸿蒙·方舟开发框架
CherryLee_121018 分钟前
基于poplar-annotation前端插件封装文本标注组件及使用
前端·文本标注
特立独行的猫a25 分钟前
C++轻量级Web框架介绍与对比:Crow与httplib
开发语言·前端·c++·crow·httplib
周航宇JoeZhou27 分钟前
JB2-7-HTML
java·前端·容器·html·h5·标签·表单
代码小库29 分钟前
【课程作业必备】Web开发技术HTML静态网站模板 - 校园动漫社团主题完整源码
前端·html
珹洺36 分钟前
Bootstrap-HTML(二)深入探索容器,网格系统和排版
前端·css·bootstrap·html·dubbo
BillKu36 分钟前
VS Code HTML CSS Support 插件详解
前端·css·html
xixixin_42 分钟前
【React】中 Body 类限定法:优雅覆盖挂载到 body 的组件样式
前端·javascript·react.js
换日线°1 小时前
NFC标签打开微信小程序
前端·微信小程序