DEV Community

Cover image for Bitbucket Pipeline Failure Deploying to Firebase
Gil
Gil

Posted on • Originally published at gilcreque.blog on

3 2

Bitbucket Pipeline Failure Deploying to Firebase

After a recent push in our develop branch our Bitbucket pipeline was complaining that it could not deploy to Firebase. The dev team was perplexed because we had built the branch several times locally and manually deployed with no problems. Here is the command we were running:

firebase deploy --token=$FIREBASE_DEPLOY_TOKEN --project project-name --non-interactive

Here is the error we were receiving:

Error: Error occurred while parsing your function triggers. Error: @grpc/grpc-js only works on Node ^8.13.0 || >=10.10.0
at Object.<anonymous>
(/opt/atlassian/pipelines/agent/build/functions/node_modules/@grpc/grpc-js/build/src/index.js:47:11)     at Module._compile
(internal/modules/cjs/loader.js:689:30)     at Object.Module._extensions..js
(internal/modules/cjs/loader.js:700:10)     at Module.load
(internal/modules/cjs/loader.js:599:32)     at tryModuleLoad
(internal/modules/cjs/loader.js:538:12)     at Function.Module._load
(internal/modules/cjs/loader.js:530:3)     at Module.require
(internal/modules/cjs/loader.js:637:17)     at require
(internal/modules/cjs/helpers.js:20:18)     at Object.<anonymous>
(/opt/atlassian/pipelines/agent/build/functions/node_modules/google-gax/build/src/grpc.js:37:14)     at Module._compile
(internal/modules/cjs/loader.js:689:30)

We started barking up the wrong tree and thought maybe the version of Node set in our Firebase functions was the issue. It actually turned out to be the version of Node set in our Bitbucket Pipeline YAML. We had recently updated our local dev environments to use Node v10.17.0, the LTS for version 10 of Node(Firebase is maxed out at using 10 for now). We had forgotten to update the Bitbucket image. We fixed it by updating our bitbucket-pipelines.yml in our project like so:

image: node:10.17.0

The new deploy ran perfectly!

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay