vue安装出现以下错误,切换镜像仍旧无法成功安装:
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/vue failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in: D:\LanguageEnvironment\nodejs\node_cache\_logs\2024-03-15T13_51_47_602Z-debug-0.log
原因:遇到了证书过期的问题。具体错误信息是CERT_HAS_EXPIRED
,表示证书已经过期
解决办法:
使用以下命令,忽略证书检查
npm install -g @vue/cli --strict-ssl=false