Google Cloud Build&Firebase部署-“发生了意外错误"; [英] Google Cloud Build & Firebase Deploy - "An unexpected error has occurred"

查看:57
本文介绍了Google Cloud Build&Firebase部署-“发生了意外错误";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当提交处于主状态时,我正在使用Google Cloud Build部署到Firebase Hosting.我正在使用部署到我的 Firebase Cloud Builder项目.我已经在Cloud Console中检查了权限,并启用了Firebase访问.

I'm using Google Cloud Build to do a deployment to Firebase Hosting when a commit is on master. I'm using the Firebase Cloud Builder, deployed to my project. I've checked permissions in the Cloud Console and Firebase access is enabled.

一切似乎都能很好地生成用于托管的静态HTML,但是在最后的构建步骤中,此问题突然失败了:

Everything seems to go well in generating the static HTML for hosting, but at the final build step it fails suddenly with this problem:

错误:发生意外错误.

这是我的cloudbuild.yaml中失败的步骤:

Here is the step in my cloudbuild.yaml that fails:

- name: gcr.io/$PROJECT_ID/firebase
  args: ['deploy', '--project', '$PROJECT_ID']
  id: Deploy to Firebase

推荐答案

我上次安装容器的时间是10月.其他人通过更新Firebase CLI的版本来解决发生了意外错误".为了使它起作用,我必须在CD环境中做同样的事情.

The last time that I installed the container was in October. The "An unexpected error has occurred" was solved by others by updating their version of the Firebase CLI. I had to do the same thing in my CD environment in order to get this to work.

按照这些说明在自述文件中:

cd cloud-builders-community/firebase
gcloud builds submit --config cloudbuild.yaml .

Firebase CLI版本已重新安装并发布到我的项目中.然后,我能够重试该构建,并且该构建成功运行.

The Firebase CLI version was reinstalled and published to my project. Then I was able to retry the build and it worked successfully.

昨天这使我绊倒了大约一个小时,我认为只将答案记录在某处可能会有所帮助.

This tripped me up for about an hour yesterday, and I thought it may be helpful to just have the answer documented somewhere.

这篇关于Google Cloud Build&Firebase部署-“发生了意外错误";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆