I’m making a dating app using react native expo and firebase, it says TypeError: undefined is not an object (evaluating '_app.default.firestore')
even though I have clearly imported firestore in my firebase config file:
// Import the functions you need from the SDKs you need
import firebase from 'firebase/app';
import 'firebase/firestore';
import { initializeApp } from "firebase/app";
import { getAnalytics } from "firebase/analytics";
import { getAuth } from "firebase/auth"
import { getFirestore } from "firebase/firestore";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
// Initialize Firebase
const app = initializeApp({
apiKey: "",
authDomain: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: "",
measurementId: ""
});
// const analytics = getAnalytics(app);
const auth = getAuth();
const db = getFirestore();
let firestore = firebase.firestore();
export { auth, db, firestore };
I know this is not a firebase forum but I already asked on the firebase GitHub forum and didn’t receive a reply, I was hoping someone here would know what to do.