报错如下:
14:17:56 npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
14:17:56 npm ERR! code CERT_HAS_EXPIRED
14:17:56 npm ERR! errno CERT_HAS_EXPIRED
14:17:56 npm ERR! request to https://registry.npm.taobao.org/less-loader failed, reason: certificate has expired
报错原因:
淘宝npm镜像域名到期
可以看见 淘宝源 使用说明
解决方案
找到 cnpm.org 私有镜像项目的 conifg/index.js 配置文件,修改 sourceNpmRegistry 源地址即可
// sourceNpmRegistry: 'https://registry.npm.taobao.org',
sourceNpmRegistry: 'https://registry.npmmirror.com', // 改成这个源地址即可