title: Cannot read properties of undefined (reading 'firestore')
body: <p>i was trying to import my firebase project to expo, but got the error &quot;firebase.js:15 Uncaught TypeError: Cannot read properties of undefined (reading 'firestore')&quot;. I have my firestore app like this:</p>
  <pre><code>import firebase, { initializeApp } from &quot;firebase/app&quot;;
  import &quot;firebase/firestore&quot;;
  
  const firebaseConfig = {
    apiKey: &quot;xxx&quot;,
    authDomain: &quot;xxx&quot;,
    projectId: &quot;xxx&quot;,
    storageBucket: &quot;xxx&quot;,
    messagingSenderId: &quot;xxx&quot;,
    appId: &quot;xxx&quot;,
  };
  
  initializeApp(firebaseConfig);
  
  const db = firebase.firestore();
  
  export { db };
  </code></pre>
  <p>Also import the initializeapp from firebase, otherwise the error is &quot;firebase.js:13 Uncaught TypeError: Cannot read properties of undefined (reading 'initializeApp')&quot;</p>
  <p>The version of firebase I'm using is &quot;firebase&quot;: &quot;^9.8.1&quot;,</p>