vue2项目下载butterfly包出错。
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/butterfly-dag failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\NETPOWER-001\AppData\Local\npm-cache_logs\2024-02-19T06_48_29_753Z-debug-0.log
说是证书过期 找了解决办法 用第二种办法解决的。
1.更新npm:确保你正在使用最新版本的npm。你可以通过运行 npm install npm@latest -g 来更新到最新版本。
2.配置npm源:尝试切换npm的源为官方源,可以通过运行 npm config set registry https://registry.npmjs.org/ 来切换到npm的官方源。
3.清除缓存:有时候缓存文件可能出现问题,你可以尝试清除npm的缓存,运行 npm cache clean --force 命令来清除npm的缓存。