【发布时间】:2019-11-02 15:47:16
【问题描述】:
从 Bitbucket Pipelines 迁移到 Google Cloud Build 后,Firebase 部署失败。该设置已在 Bitbucket Pipelines 和本地成功部署。
除了下面的错误之外没有给出进一步的解释。我对代码的部分进行了注释,以意识到“const sharp = require('sharp')”是导致构建失败的一个命令。
但是没有明显的原因导致“firebase deploy”因“require('sharp')”而失败,我必须设法解决这个问题。
Google Cloud Build 中的 Firebase 部署输出
Step #5: === Deploying to 'werkout-staging-b1483'...
Step #5:
Step #5: i deploying functions
Step #5: ✔ functions: Finished running predeploy script.
Step #5: i functions: ensuring necessary APIs are enabled...
Step #5: ✔ functions: all necessary APIs are enabled
Step #5: i functions: preparing functions/cloud_functions directory for uploading...
Step #5:
Step #5: Error: There was an unknown problem while trying to parse function triggers. Please ensure you are using Node.js v6 or greater.
Finished Step #5
ERROR
ERROR: build step 5 "gcr.io/werkout-staging-b1483/firebase" failed: exit status 2
Dockerfile
FROM cypress/base:10.15.3
#CMD ["node"]
RUN npm install -g firebase-tools@^7.0.0
ENTRYPOINT ["/usr/local/bin/firebase"]
有什么想法吗?
【问题讨论】:
-
我已经阅读了这个问题。我的错误没有那么冗长,而且只发生在 Cloud Build 上。我也知道 Node 版本不是问题,因为我在 Bitbucket Pipelines 上使用了相同的 docker 映像。
标签: node.js firebase google-cloud-functions google-cloud-build sharp