Skip to content

Accept firebase 13 in @angular/fire 22 #3830

Open

Description

@armando-navarro

firebase 13.1.0 is now npm latest, and @angular/fire 22.0.0-rc.0 declares firebase ^12.18.0 as a peer dependency (#3805). So on a new Angular 22 app, running npm install firebase before ng add @angular/fire@next fails:

npm error ERESOLVE unable to resolve dependency tree
npm error peer firebase@"^12.18.0" from @angular/fire@22.0.0-rc.0

Proposal

I'd like @angular/fire 22.0.0 to accept firebase ^12.18.0 || ^13.0.0:

  • Apps on firebase 12 keep working with no change.
  • rxfire moves to ^6.3.0, the first release whose peer range includes firebase 13.
  • When ng add or the v22 ng update migration writes a firebase entry, it writes the range of the major already installed:
    • ^13.0.0 when firebase 13 is installed.
    • ^12.18.0 otherwise.
  • The package keeps building against firebase 12, because the generated wrappers import each function by name from the installed firebase. A new CI job runs the specs against firebase 13.

Why the written range follows the installed major

On npm, ng add installs a missing firebase peer before its schematic runs, at the newest version the range allows. If the schematic then wrote ^12.18.0, the reinstall would downgrade firebase and leave two @firebase/app copies, and the app would fail at startup with "No Firebase App '[DEFAULT]' has been created".

What changes for an app that moves to firebase 13

  • @angular/fire/ai re-exports firebase/ai, so VertexAIBackend and the ChatSession class are no longer available.
    • AgentPlatformBackend replaces VertexAIBackend, and the v21 ng update migration already handles it.
  • firebase 13's packages declare Node 24.12 or newer.

If you're already on firebase 13 and run into something this doesn't cover, please comment here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp: coreFirebaseApp DI core (src/app).comp: schematicsng add / deploy schematics (src/schematics).type: featureNew capability or enhancement.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy