Understanding Authentication in Expo

I’m playing with Firebase authentication. I used “expo install firebase” to install firebase. Any thoughts as to why I’m getting the error “initializeApp” is not a function in the following code? Does Expo Firebase not support the new tree-shaking coding style that google has implemented?

// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
// 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
const firebaseConfig = {
   // config items removed
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);
1 Like

Ah yes… now that I look at the package.json, I see firebase version 8. Version 9 is the latest version that supports the tree-shaking style.

Curious at this point if anyone knows if I can upgrade to version 9 in expo at this point?

1 Like

I’d also be interested to know if/when firebase version 9 will be supported. Firebase is by far the bulkiest package in our app bundle right now so I’d love to switch to v9 and use the tree-shaking.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.