Skip to content

Firebase Cloud Functions errorWhy does firebase deploy fail for my Cloud Functions?

The functions run in the emulator, then firebase deploy stops with an error about billing, permissions, a build or a health check. Each message points somewhere different. Here’s how to read it and what to change, or hand it over at a fixed price.

Short answer

Read the error’s first line and match it: deploying functions needs the Blaze plan; Node.js 14 and 16 can no longer be deployed; “could not build the function” is often a permission problem on the build service account; “Container Healthcheck failed” means the code failed to start and listen for requests; and 429 or 500 errors on a big deploy mean you deployed a large number of functions at once. Fix that one cause and deploy again.

Match the error, then fix it

  1. 01

    The project isn’t on the Blaze plan

    “You can emulate functions in any Firebase project, but to deploy functions, your project must be on the Blaze pricing plan .” Firebase, Get started with Cloud Functions

    The emulator works on any plan, but deploying functions needs the Blaze pricing plan. If your project is on another plan, that’s the cause.

  2. 02

    An unsupported Node.js version

    “Node.js Versions 14 and 16 were decommissioned in early 2025. Deployment with these versions is disabled.” Firebase, Manage functions

    Deploys on Node.js 14 or 16 are disabled. Set a supported version in the engines field of functions/package.json, or in firebase.json, which wins if both are set. The runtime checker linked below shows which version your config deploys.

    // functions/package.json
    "engines": { "node": "<supported version>" }
  3. 03

    “Could not build the function”: build permissions

    “Could not build the function due to a missing permission on the build service account.” Google Cloud, Troubleshoot Cloud Run functions

    Google says many deploy issues come from roles and permissions or incorrect configuration. The build service account needs to read your uploaded source and write the built image. Google lists two fixes: a custom build service account, or the Cloud Build Service Account role on the default Compute service account. If the message says the service account is disabled, it has to be enabled again.

  4. 04

    “Container Healthcheck failed”: the code crashes on start

    “The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable.” Google Cloud, Troubleshoot Cloud Run functions

    The build worked, but the function didn’t start. Code in the global scope failed before the function could listen for requests. Read the build logs, and if the cause is unclear, Google suggests moving that setup into the function itself for now, with lazy initialization.

  5. 05

    429 or 500 errors when deploying many functions

    “When deploying large numbers of functions, you may exceed the standard quota and receive HTTP 429 or 500 error messages.” Firebase, Manage functions

    Deploying a large number of functions at once can exceed the standard quota. Deploy only the functions you changed with --only, and send large deploys in groups of 10 or fewer.

    firebase deploy --only functions:createCheckout,functions:stripeWebhook

Checked against the vendor’s docs on : Firebase docs: Get started with Cloud Functions; Firebase docs: Manage functions; Google Cloud docs: Troubleshoot Cloud Run functions.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: Firebase Cloud Functions CORS error · Firebase App Check blocking requests · Cloud Functions Node.js runtime checker · How to cut your Firebase bill

Questions

More on this error

It works in the emulator. Why not on deploy?

The emulator runs on your machine on any plan. A deploy runs in Google Cloud, where the plan, Node.js version, permissions and quotas apply, which is where the errors above come from.

Will upgrading to Blaze cost me money?

Check the Blaze plan details on Firebase’s pricing page before you upgrade. Our guide to cutting your Firebase bill covers the settings that drive cost.

What do you need to see to fix a failed deploy?

The repo and the full deploy error, ideally with the build log. Permission changes happen in your Google Cloud project; we tell you exactly which role to add where, or make the change with access you grant.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; we reply by email, usually within one business day.