DEV Community

Cover image for Why your firebase-admin 14 Dependabot PR fails with ERESOLVE (and how to unblock it)
Ivan Tsomo
Ivan Tsomo

Posted on AI-assisted

Why your firebase-admin 14 Dependabot PR fails with ERESOLVE (and how to unblock it)

Right now, hundreds of repositories have an open Dependabot pull request titled "Bump firebase-admin from 13.x to 14.x". On October 28, 2026, GitHub search showed 388 of them still open from v13, and 260 from v12.

Many of them are stuck for a reason that has nothing to do with your code: npm install fails before your tests even run.

npm error code ERESOLVE
npm error Could not resolve dependency:
npm error peer firebase-admin@"^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0" from firebase-functions-test@3.5.0
Enter fullscreen mode Exit fullscreen mode

I ran into this while testing a migration tool on 17 active open-source projects that had this exact Dependabot PR open: 9 of them could not install the upgraded dependencies at all. Two packages from the Firebase ecosystem were responsible.

Blocker 1: firebase-functions older than 7.3.0

firebase-functions only added firebase-admin 14 to its peer range in 7.3.0 (released July 16, 2026). Anything older, including all of 6.x, rejects it:

npm error peer firebase-admin@"^11.10.0 || ^12.0.0 || ^13.0.0" from firebase-functions@7.0.3
Enter fullscreen mode Exit fullscreen mode

Fix: bump it in the same PR.

{
  "dependencies": {
    "firebase-admin": "^14.0.0",
    "firebase-functions": "^7.3.0"
  }
}
Enter fullscreen mode Exit fullscreen mode

If your lockfile pins an older 7.x, regenerate it after changing the range. This one is fully solved: the current 7.x releases accept v14.

Blocker 2: firebase-functions-test has no compatible release yet

This is the one most people hit, because firebase init functions adds firebase-functions-test as a dev dependency by default.

Its latest published version, 3.5.0 (May 2026), declares a firebase-admin peer range that stops at ^13. No published version accepts firebase-admin 14.

The fix exists upstream:

  • support for firebase-admin 14 was merged on October 2 in firebase/firebase-functions-test#336 (closing #327);
  • the release is tracked in #347: the next version will be 4.0.0, because main also contains breaking changes (for example, Node 22 minimum).

So the honest answer is: the real fix is to wait for firebase-functions-test 4.0.0. Until then, you have three options.

Option A: wait, and keep v13 for now

If your Cloud Functions rely heavily on firebase-functions-test, this is the safest choice. v13 keeps working. Watch #347 and upgrade when 4.0.0 ships.

Option B: a targeted npm override

If you want to move the rest of your project to v14 now, you can tell npm to accept firebase-admin 14 only for this package:

{
  "overrides": {
    "firebase-functions-test": {
      "firebase-admin": "$firebase-admin"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

I checked it with npm 11: without the override, the install fails with ERESOLVE; with it, it resolves.

But be clear about what this does: it silences the peer check, it does not make 3.5.0 compatible. The package was written against v13, so some of its helpers or type declarations may not work with v14. Run your function tests. If TypeScript complains inside node_modules/firebase-functions-test, skipLibCheck will hide it, but check that your tests still exercise what you expect. Remove the override once 4.0.0 is out.

Option C: --legacy-peer-deps

It works too, but it disables peer checks for every package in the install, which can hide real conflicts. I'd prefer the targeted override in Option B.

Don't forget the actual code changes

Unblocking the install is only half of it. firebase-admin 14 removed the namespaced API, so code like this stops working:

import * as admin from "firebase-admin";

admin.initializeApp();
const db = admin.firestore();
await db.doc(`users/${uid}`).update({
  updatedAt: admin.firestore.FieldValue.serverTimestamp(),
});
await admin.auth().setCustomUserClaims(uid, { admin: true });
Enter fullscreen mode Exit fullscreen mode

It becomes:

import { initializeApp } from "firebase-admin/app";
import { getFirestore, FieldValue } from "firebase-admin/firestore";
import { getAuth } from "firebase-admin/auth";

initializeApp();
const db = getFirestore();
await db.doc(`users/${uid}`).update({
  updatedAt: FieldValue.serverTimestamp(),
});
await getAuth().setCustomUserClaims(uid, { admin: true });
Enter fullscreen mode Exit fullscreen mode

Dependabot only changes the version number, so its PR alone usually breaks the build. And remember that firebase-admin 14 requires Node.js 22: check engines.node in your functions/package.json and your CI image.

A checklist for your firebase-admin 14 PR

  1. firebase-functions → ^7.3.0 or later.
  2. firebase-functions-test → wait for 4.0.0, or add the targeted override and run your tests.
  3. Move namespaced calls (admin.firestore(), admin.auth(), admin.credential.cert()…) to firebase-admin/<service>.
  4. Node.js 22 everywhere (local, CI, deployed functions).
  5. Regenerate the lockfile, then run your type checker and tests.

About the tool I used

I found these blockers while building UpstreamFix, an open-source (MIT) CLI that migrates code across breaking SDK upgrades. Since version 0.5.0, for firebase-admin 14 it does steps 1 and 3 for you, flags the firebase-functions-test blocker instead of failing with a raw ERESOLVE, and verifies the result in a clean copy of your project before proposing anything:

npx upstreamfix migrate firebase-admin@14 --verify
Enter fullscreen mode Exit fullscreen mode

Source: ivanDev237/upstreamfix. It refuses to guess: anything it cannot migrate safely is reported for manual review instead.

Your turn

Is firebase-functions-test what's holding your project on v13, or is it something else, like the Node 22 bump or the size of the diff? If you tried the override, did your function tests still pass?

Top comments (0)