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

前言

一直使用 npm build没问题的,突然出现报错:

npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/axios failed, reason: certificate has expired

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2024-01-22T06_15_36_690Z-debug.log

解决方案

npm config set strict-ssl false

This is a alternative shared in this url https://github.com/nodejs/node/issues/3742

posted @ 2024-01-22 22:09  牛奔  阅读(1998)  评论(2编辑  收藏  举报