从 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"]
有任何想法吗?