yarn ssl 报错解决

aaaaa@aaaaadeMBP go-admin-ui % sudo yarn install
yarn install v1.22.22
info No lockfile found.
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
error Error: certificate has expired
    at TLSSocket.onConnectSecure (node:_tls_wrap:1677:34)
    at TLSSocket.emit (node:events:519:28)
    at TLSSocket._finishInit (node:_tls_wrap:1076:8)
    at ssl.onhandshakedone (node:_tls_wrap:862:12)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

镜像选择

npm config set registry https://registry.npmmirror.com

安装

npm install -g yarn

解决办法 忽略 ssl

yarn config set strict-ssl false

安装忽略版本

yarn install --ignore-engines
posted @ 2024-11-11 16:31  Lafite-1820  阅读(12)  评论(0编辑  收藏  举报