yarn 安装包时报“certificate has expired”

yarn 报错问题处理
更新于: 2024-01-27 20:37:18

报错信息

info No lockfile found.
[1/4] Resolving packages...
error Error: certificate has expired
    at TLSSocket.onConnectSecure (node:_tls_wrap:1539:34)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket._finishInit (node:_tls_wrap:953:8)
    at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:734:12)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

查看配置

yarn config list
yarn 配置截图

解决方案

yarn config set strict-ssl false

参考