Skip to content

Firebase v9 breaks redwood auth #3344

@domvernon

Description

@domvernon

Hi 👋

I recently added Firebase Auth to a new project. In my package.json In the web workspace I can see it has added "firebase": "^9.0.1",. As v9 moves to a modular sdk , I am seeing (not surprisingly) the following message when running yarn rw dev:

web | WARNING in ./src/App.js 23:7-27
web | export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)

There are some workarounds which appear to work, but I haven't throughly tested them:

  1. Manually change the package.json version to v8 eg "firebase": "^8", or similar
  2. Change the imports in App.js to the ones found in the compat guide here. <-- this may be deprecated as soon as v10 though

The permanent solution will be to follow the upgrade guide, which I haven't had a chance to try out, but just wanted to let everyone know in case they ran into this as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions