centos 使用npm 安装依赖包出现如下错误。
[root@localhost assets]# npm install
npm ERR! code CERT_NOT_YET_VALID
npm ERR! errno CERT_NOT_YET_VALID
npm ERR! request to https://registry.npmjs.org/@babel%2fcore failed, reason: certificate is not yet
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-12-02T13_31_32_722Z-debug.log
解决方案:设置strict-ssl
为false
即可
npm config set strict-ssl false