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
相关推荐
靳向阳17 小时前
【无标题】
前端·javascript·vue.js
存在的五月雨17 小时前
uniapp 一些组件的使用
java·前端·uni-app
涵涵(互关)17 小时前
GoView各项目文件中的相关语法
前端·vue.js·typescript
佳xuan17 小时前
QA与RAG检索
java·服务器·前端
z194089206617 小时前
微软语音识别失败原因排查:从上传到获取文本的完整指南
前端·经验分享·语音识别
M ? A17 小时前
Vue 转 React:toRaw(),VuReact 怎么处理?
前端·javascript·vue.js·经验分享·react.js·面试·vureact
久爱@勿忘17 小时前
uniappH5跳转小程序
前端·小程序·uni-app
布局呆星20 小时前
Vue Router :基础使用与嵌套路由实战
前端·javascript·vue.js
小码哥_常1 天前
安卓开发秘籍:解锁10大性能优化秘诀
前端
try2find1 天前
打印ascii码报错问题
java·linux·前端