Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

169
Vistas
Unable to import Firebase JS SDK with React Native Expo

In my React Native app, I am trying to use the Firebase JS SDK with Expo as mentioned in this guide, although after installing the dependencies via expo install firebase, I am unable to import modules from firebase/auth. Calling the respective methods like getAuth() results in the following error:

TypeError: (0, _auth.getAuth) is not a function. (In '(0, _auth.getAuth)()', '(0, _auth.getAuth)' is undefined)

I am also unable to import modules from firebase/database, firebase/firestore etc.

My project is set up using Typescript, but I also experienced this problem with a JS-only project.

I am able to import firebase from firebase/app, but not the respective modules: enter image description here

edit: I am using getAuth() and the other methods in the following context:

React.useEffect(() => {

 if (response?.type === "success") {
  const { id_token } = response.params;

  const auth = getAuth();      
  const provider = new GoogleAuthProvider();
  const credential = provider.credential(id_token);
  signInWithCredential(auth, credential);
 }
}, [response]);

I am using Firebase 8.2.3.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

The import syntax you're using is for Firebase SDK version 9 and later. For version 8 and below, use:

import firebase from 'firebase/app';
import 'firebase/auth';
...

And then use the v8 syntax as shown here.

about 4 years ago · Juan Pablo Isaza Denunciar

0

unfortunatly latest expo sdk is not compatible with firebase9 and if you use this version of firebase you see tones of odd error use firebase version 8

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda