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