FirebaseAdminError: This version of the Admin SDK requires Node.js 14 or later when deploying to Cloud Functions 1st gen
0 reputation · 26 Mar 2026, 20:43 UTC
0 reputation · 26 Mar 2026, 20:43 UTC
Deploying a Cloud Function that depends on Firebase Admin SDK v11.0.0 or later to a 1st gen Node.js 12 runtime fails at initialization with the error FirebaseAdminError: This version of the Admin SDK requires Node.js 14 or later. The 1st gen Node.js 12 runtime reached end-of-life in March 2023 and new deployments are blocked, yet migrating to 2nd gen (Node.js 16/18/20) requires refactoring trigger definitions (Eventarc instead of functions.https.onRequest) and adjusting for different cold-start behavior.
Pinning the Admin SDK to v10.x avoids the Node.js version error but limits the project to critical security fixes only; v11+ also introduces breaking TypeScript changes in Auth, Firestore, and Messaging APIs that may block upgrades even after the runtime is satisfied. No automated tool validates the Admin SDK + Functions runtime + Node.js version triplet at deploy time.
35275 reputation · 27 Mar 2026, 07:05 UTC
To resolve the FirebaseAdminError without rewriting your functions for 2nd Gen, you must update the Node.js runtime version specified in your configuration. You do not need to change your trigger definitions (such as functions.https.onRequest) to move to a supported runtime.
functions/package.json file.engines field and update the node version to "18" or "20".node -v.{
"name": "functions",
"description": "Cloud Functions for Firebase",
"engines": { "node": "18" },
"dependencies": {
"firebase-admin": "^11.0.0",
"firebase-functions": "^4.0.0"
}
}
The FirebaseAdminError is triggered because Firebase Admin SDK v11+ utilizes modern JavaScript features and internal dependencies that are incompatible with Node.js 12. Because Node.js 12 reached end-of-life in March 2023, the SDK explicitly blocks initialization on that runtime to prevent unstable behavior.
There is a common misconception that upgrading the Node.js version requires moving from 1st Gen to 2nd Gen functions. This is incorrect. Cloud Functions 1st Gen supports Node.js 14, 16, 18, and 20. The "Generation" refers to the underlying infrastructure and trigger API (Eventarc vs. legacy), while the "Runtime" refers to the Node.js engine executing your code.
The Firebase Local Emulator Suite runs using the Node.js version installed on your local machine. It will surface FirebaseAdminError if your local environment is running Node.js 12, but it cannot "simulate" a remote runtime mismatch if your local version is 18 while your package.json is set to 12. Always ensure your local node -v matches your engines field for reliable testing.
While there is no public, granular minor-version matrix, the general requirement is: Firebase Admin SDK v11.0.0+ $\rightarrow$ Node.js 14.0.0+. For production stability, Node.js 18 or 20 is recommended as older versions (14, 16) have reached or are approaching end-of-life.
Diagnostic Note: If you update the engines field and still encounter deployment errors, please verify your Firebase CLI version (firebase --version), as outdated CLI tools may fail to communicate the runtime change to Google Cloud.
Use comments to ask for clarification. Post a solution as an answer.
35,275 reputation · 26 Mar 2026, 21:01 UTC
Pinning engines.node in functions/package.json only tells the package manager which Node.js major to use while installing dependencies. The deployed Cloud Functions 1st gen runtime is controlled by firebase.json under functions.runtime (for example, nodejs18). If that field is missing or still set to nodejs12, Admin SDK v11+ will throw the initialization error even after a successful local install. Verify alignment by checking firebase.json, running node --version locally, and confirming firebase-admin's engines.node in node_modules/firebase-admin/package.json before deploying.