报错
error Error: certificate has expired at TLSSocket.onConnectSecure (_tls_wrap.js:1515:34) at TLSSocket.emit (events.js:400:28) at TLSSocket._finishInit (_tls_wrap.js:937:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:709:12) info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command
出现的原因
通常这表示 HTTPS 请求因为服务器的 SSL 证书无效或过期而被拒绝
解决方案
# 第一种
export NODE_TLS_REJECT_UNAUTHORIZED=0
# 第二种 取消ssl验证
npm config set strict-ssl false
# 第三种 更换npm镜像源(使用其中一种)
npm config set registry http://registry.cnpmjs.org
npm config set registry https://registry.npmjs.org
npm config set registry https://registry.npmmirror.com
npm i -g firebase-tools@latest
npm config set registry http://registry.cnpmjs.org
npm config set registry http://registry.npm.taobao.org
# 第四种
删除 yarn.lock 文件,重新执行 yarn install
## 全代码
yaml文件
- name: Install dependencies run: | yarn config set strict-ssl false yarn install --frozen-lockfile