I followed one of the tutorial on React Native and got stopped in this error.
I used expo for my project. I used
expo install firebase
to install firebase in the project. When I run the project
expo start -c
I get the following error
Failed to compile.
C:/Users/*****/Desktop/*****/Apps/React Native/******/App.js
Module not found: Can't resolve 'firebase' in 'C:\Users\****\Desktop\*****\Apps\React Native\*****'
EDIT:
Here's the code
import * as firebase from "firebase";
const firebaseConfig = {
apiKey: "**********",
authDomain: "************",
projectId: "****************",
storageBucket: "************",
messagingSenderId: "***************",
appId: "********************",
measurementId: "***********",
};
if (firebase.apps.length === 0) {
firebase.initializeApp(firebaseConfig);
}
Can anyone help to resolve this issue ?
Thanks !

import * as firebase from "firebase";