Emulator is showing error {firebase.App() not found} while using firebase authentication with React Native using expo-cli

1.8k Views Asked by At

While using functionality of authentication through firebase, emulator is showing error i.e.{ you attempted to use a firebase module that is not installed on your android project by calling firebase.app() }.Please help me to resolve this error. I'm using Expo as command line input.

react-native version -0.63.6,
"@react-native-firebase/app": "^8.4.3",
"@react-native-firebase/auth": "^9.2.3"

emulator

2

There are 2 best solutions below

0
On

If you are using expo client, you should not use react-native-firebase modules because they are not compatible with expo client.

However, you can use firebase javascript SDK instead. It is all explained there.

0
On

Update 02-12-2021

Guys expo's eas-build is now public. You can add custom native codes and use react-native-firebase. Here is the link to a youtube tutorial. The video is short and super easy to follow. Here is the link to the docs

Previous answer

Currently, Firebase does not work in react native if you are using the mobile configuration. However, if you use the web configuration it will work. Here is the youtube tutorial. Watch from 38:20 to set up.