Skip to content

Firebase: No Firebase App ‘[DEFAULT]’ has been created in React app #382

Closed Answered by flyon
flyon asked this question in Q&A
Discussion options

You must be logged in to vote

It's working for us now. When we made a codesandbox test setup with react-create-app it was working.
In our own setup we discovered firebase/app was being imported as CJS whilst the dynamic import of @capacitor-firebase/messaging would import firebase/app as ESM. Basically two different firebase versions were being loaded.

For now we fixed that by switching our app to ESM. Once the same firebase version was loaded in both instances it worked as expected. I'll close this discussion

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@robingenz
Comment options

@flyon
Comment options

Answer selected by robingenz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants