Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

399
Views
Firebase 9: no se encontró la exportación 'initializeApp' en 'firebase/app'

Después de actualizar a firebase 9, tengo problemas para importar algunas funciones que solían funcionar en firebase 8. Por supuesto, leí los documentos y refactoricé el código, pero este error sigue apareciendo, esto también sucede con otras importaciones.

Mis importaciones se ven así

 import { initializeApp } from 'firebase/app' import { getDatabase } from 'firebase/database' import { getAuth, signInWithCustomToken, onAuthStateChanged } from 'firebase/auth'

El error que me sale es:

Exportar 'initializeApp' no se encontró en 'firebase/app'


También intenté usar las bibliotecas de compatibilidad.

 import { initializeApp } from 'firebase/compat/app' import { getDatabase } from 'firebase/compat/database' import { getAuth, signInWithCustomToken, onAuthStateChanged } from 'firebase/compat/auth'

pero todavía tengo

ADVERTENCIA "exportar 'initializeApp' no se encontró en 'firebase/compat/app'

Esto también sucede con mis otras importaciones.

¿Alguna ayuda?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

La versión compat usa la sintaxis de espacio de nombres V8 y no requiere importaciones separadas para cada función como en la sintaxis modular/funcional más nueva:

 import firebase from 'firebase/compat/app' import 'firebase/compat/database' import 'firebase/compat/auth' // import { getAuth } from 'firebase/auth' <-- Modular version only

Si está utilizando la versión compat , asegúrese de seguir la pestaña de versión con namespaced de nombres en la documentación:

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!