Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Node.js, PHP and APIs

firebase deploy --only functions fails with a generic deploy error

ErrorError: There was an error deploying functions

Short answer

The generic message hides a specific one. Read the lines above it, or the function logs. Check three things: the Node.js version in engines must be one Firebase still supports, large deploys can hit quota errors (HTTP 429 or 500) and should go in groups, and the project must be on the Blaze plan.

  • Applies to firebase-tools 14, Node.js 22, Cloud Functions for Firebase
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Re-run the deploy and read the first error line it prints, not the last one. Then check the Node.js version your functions request.

    firebase deploy --only functions
    grep -A2 '"engines"' functions/package.json
  2. 2Match what you see, then jump to its fix

    1. 1engines.node is 14, 16 or 18 in functions/package.jsonThe Node.js runtime is no longer supportedFix
    2. 2HTTP 429 or 500 in the deploy output on a project with many functionsToo many functions in one deploy hit a quotaFix
    3. 3The project is on the free Spark planThe project is not on the Blaze planFix

What does the error look like?

  • Error: There was an error deploying functions
  • HTTP 429

Cause 1 of 3

The Node.js runtime is no longer supported

1Check

Firebase lists Node.js 22 and 20 as supported, with 18 deprecated. Node.js 14 and 16 were decommissioned and deploying with them is disabled.

grep -A2 '"engines"' functions/package.json
node --version

2Fix

Set a supported version in engines (or runtime in firebase.json), and use firebase-tools 11.18.0 or later.

// functions/package.json
"engines": { "node": "22" }

3Verify

Redeploy all functions.

firebase deploy --only functions

Confirmed by firebase.google.com

Did this fix it?

Cause 2 of 3

Too many functions in one deploy hit a quota

1Check

Deploying a large number of functions at once can exceed the standard quota.

firebase functions:list

2Fix

Deploy in groups of 10 functions or fewer, naming them with --only.

firebase deploy --only functions:funcA,functions:funcB

3Verify

Each group deploys without the quota error.

firebase functions:list

Confirmed by firebase.google.com

Did this fix it?

Cause 3 of 3

The project is not on the Blaze plan

1Check

Deploying functions requires the pay-as-you-go Blaze plan, and deploys are rate-limited.

firebase use

2Fix

Upgrade the project to Blaze in the Firebase console, then deploy again.

firebase deploy --only functions

3Verify

The deploy proceeds past the API checks.

firebase functions:list

Confirmed by firebase.google.com

Did this fix it?

How do I stop it coming back?

  • Pin the Node.js version in engines and review it when Firebase announces a deprecation.
  • Deploy only the functions you changed on large projects.
  • Keep firebase-tools, firebase-functions and firebase-admin current.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Back end

firebase-admin warns that FIREBASE_CONFIG is missing

Warning, FIREBASE_CONFIG environment variable is missing. Initializing firebase-admin will fail

Cloud Functions for Firebase sets FIREBASE_CONFIG for you; a script run with plain node does not have it.

3 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.