After migrating to Google Cloud Build from Bitbucket Pipelines the Firebase deployment is failing. The setup was deploying successfully both on Bitbucket Pipelines and locally.
No further explanation is given other than error below. I have comment parts of the code to to realize that "const sharp = require('sharp')" was one command that was making the build to fail.
But there is no apparent reason why "firebase deploy" fails with "require('sharp')" and I have to way to tackle this.
Firebase deploy output in Google Cloud Build
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"]
Any ideas?