i am facing a problem since past days, and not able to solve it
can anyone help me slight to make it work efficiently
Moreover also have degraded firebase to 9.6.11 as per other solutions on similar site.
import firebase from "firebase/compat/app";
import "firebase/compat/auth";
import "firebase/compat/firestore";
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: ".......................",
authDomain: ".......................",
projectId: ".......................",
storageBucket: ".......................",
messagingSenderId: ".......................",
appId: "......................."
};
// Initialize Firebase
let app;
if (firebase.apps.length === 0) {
app = firebase.initializeApp(firebaseConfig);
} else {
app = firebase.app()
}
const auth = firebase.auth()
export { auth };````
3
Answers
the issue is solved thanks. Create a new file
metro.config.js
in the root folder of your project and add the code snippet in it.there’s an issue open on the metro repo facebook/metro#535
builds work fine again for me after adding this to my metro config:
Though the most upper one resolve the issue. If you want to know more, follow this official link – https://docs.expo.dev/guides/using-firebase/#step-3-configure-metro
Or just paste the code in a new file metro.config.js on your root project folder –