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

212
Vistas
.initializeApp is not a function (firebase 9.6.7)

I am developing an app using Gatsby, React, and Firebase. The app works fine in the npm run develop stage of development, but when I attempt to build using npm run build, I get the error

WebpackError: TypeError: (0 , dist_namespaceObject.initializeApp) is not a function

import { initializeApp } from "firebase/app"
import { getFirestore, getDoc, doc} from "firebase/firestore";


import { navigate } from 'gatsby'


const firebaseConfig = {
   // Firebase config goes here
};


const app = initializeApp(firebaseConfig);
//const analytics = getAnalytics(app);
const db = getFirestore();

This is the relevant code I am using, and I cannot find any solution to this problem as of right now. I am using Firebase 9.6.7, Gatsby 4.8.0, React 17.0.2 and Node 17.31. I've tried all sorts of things, including changing the import, importing everything, but have had no luck so far.

about 4 years ago · Juan Pablo Isaza
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