Node.js 20 is decommissioned on Cloud Functions for Firebase: move to 24 or 22
On October 30, 2026, the Node.js 20 runtime for Cloud Functions was decommissioned. You can no longer deploy or update functions on Node.js 20, so firebase deploy stops with the error below. The fix is one line in functions/package.json. Move to Node.js 24 if all your functions are 2nd gen, or to Node.js 22 if you have 1st gen functions.
Error: Runtime Node.js 20 was decommissioned on 2026-10-30. To deploy you must
first upgrade your runtime version.In short
- It’s not only deploys. Functions you already deployed still run, but they get no security patches and may be disabled, with no date set. Dates and what they mean
- Change one line and redeploy. Set
engines.nodeto"24"or"22". Iffirebase.jsonhas aruntime, that one wins. How - 24 for 2nd gen, 22 for 1st gen. Node.js 22 is the last runtime for 1st gen functions, so they have to move to 2nd gen before 22 ends on October 31, 2027. 1st gen functions
- If you upgrade the SDKs, check two things.
firebase-functions7 removedfunctions.config(), andfirebase-admin14 runs only on Node.js 22 or later. SDK versions
Dates and what they mean
This is Google Cloud’s runtime support schedule. During deprecation you can still deploy; after decommission you can neither create nor update functions on the runtime.
| Runtime | Available to | Deprecation | Decommission |
|---|---|---|---|
| Node.js 18 | 1st gen, 2nd gen | 2025-04-30 | 2025-10-30 |
| Node.js 20 | 1st gen, 2nd gen | 2026-04-30 | 2026-10-30 |
| Node.js 22 | 1st gen, 2nd gen | 2027-04-30 | 2027-10-31 |
| Node.js 24 | 2nd gen only | 2028-04-30 | 2028-10-31 |
What changes at decommission:
| During deprecation | After decommission | |
|---|---|---|
| Deploy or update | Yes | No |
| Functions already deployed | Run | Run, but may be disabled |
| Node.js and OS security patches | Yes | None |
The policy gives no date for disabling. A function that runs fine today can’t be redeployed the moment you need to fix a bug, and you can’t tell when it might stop. There’s no way around it either: turn off the CLI’s runtime check and the server still refuses (CLI source).
Moving to Node.js 24 or 22
- Check each function’s generation and runtime. Run
firebase functions:list. In the Version column,v1is 1st gen andv2is 2nd gen; the Runtime column is the current runtime. - Pick a version. The runtime is set per codebase (usually the
functionsfolder), not per function. If any function in it is 1st gen, pick 22; if all are 2nd gen, pick 24. Node.js 24 lasts until October 31, 2028, but 1st gen doesn’t support it. Firebase’s docs don’t list 24 yet, but Cloud’s schedule has it for 2nd gen and the Firebase CLI supports it from 14.26.0. - Change one line in
package.json. The value is a single major version. A range such as>=22or22.xmakes the CLI fail withDetected node engine ... which is not a supported version.{ "engines": { "node": "24" } }If
firebase.jsonhas aruntime, the CLI uses that value first, so change it there instead.{ "functions": { "source": "functions", "runtime": "nodejs24" } } - Use the same Node.js locally and in CI. The emulator runs your functions on the Node.js you have installed. If the versions differ, it only warns,
Your requested "node" version "24" doesn't match your global version "20", and runs them on 20, so your tests run on a different version than production. - Deploy. Run
firebase deploy --only functions, then check that the Runtime column offirebase functions:listsaysnodejs24(ornodejs22).
SDK versions
If you upgrade the SDKs along with Node.js, check these.
| Package | What to check |
|---|---|
firebase-tools (CLI) | Deploys nodejs22 from 13.11.0 and nodejs24 from 14.26.0. |
firebase-functions | Below 6.2.0, ESM code with a top-level await breaks on Node.js 22.12 and later. 7.0.0 removed functions.config(): calling it throws at runtime. |
firebase-admin | 14 runs only on Node.js 22 or later and needs firebase-functions 7.3.0 or later (peer dependency). 13 runs on Node.js 18 or later. |
If you still use functions.config(), keep firebase-functions on 6.x and change only Node.js. Deploys that use functions.config() fail after March 2027 too, so move to environment variables or Secret Manager before then.
1st gen functions
Node.js 22 is the last runtime 1st gen functions can use, and it is decommissioned on October 31, 2027. They have to move to 2nd gen before then. Firebase CLI 15.35.0’s warnings give 22’s decommission date as 2028-10-31, but Google Cloud’s schedule, 2027-10-31, is the one that counts (CLI source). You can’t switch a function in place under the same name, so Firebase tells you to deploy the 2nd gen function under a new name, move traffic to it, then delete the 1st gen one (upgrade guide). What to watch for:
- URLs change. For HTTP, callable and task queue functions, a new name is a new URL. Move your apps and webhooks to it, then delete the old function with
firebase functions:delete. - Events are handled twice. While both exist, event triggers such as Firestore and Storage run both functions for the same event. Make sure running twice gives the same result.
- Some things are missing. 2nd gen has no
functions.config()and no Analytics event triggers, and the Authentication user created and deleted triggers (onUserCreated,onUserDeleted) are still in Preview. - Defaults differ. One instance handles up to 80 requests at once by default, and the default service account becomes the Compute Engine default service account. If you keep per-request values in global variables, or granted IAM permissions to the App Engine default service account, fix that.
Extensions
Installed extensions run on Cloud Functions too, and the extension’s version sets their runtime. Firebase tells you to keep each extension updated to its latest version.
firebase ext:update <instance-id>
firebase deploy --only extensionsThe Firebase Extensions service shuts down on March 31, 2027. Installed extensions keep running after that, but management features such as updates go away. Most are built on 1st gen functions, so they may stop or be disabled once their runtime is decommissioned. If you depend on one, plan to replace it with your own function.
Sources
- Runtime support schedule, Cloud Functions release notes: dates, what deprecation and decommission mean, Node.js 22 on 1st gen and Node.js 24 on 2nd gen
- Manage functions (set the Node.js version), Cloud Functions FAQ:
enginesandruntime, extensions’ runtimes - Firebase CLI 15.35.0 source: runtime check and error message, runtime dates, reading
engines, the emulator’s choice of Node.js, server-side checks - Release notes of firebase-tools, firebase-functions and firebase-admin 14.0.0, environment configuration
- Upgrade 1st gen to 2nd gen, version comparison, Authentication triggers, Extensions FAQ, extension.yaml reference
