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

266
Views
React Firebase Integration - TypeError: firebase_app__WEBPACK_IMPORTED_MODULE_0__.default is undefined

Stack Overflow! Long time no see.

I'm developing a web app with react where you can see definitions that I wrote in a firebase database for modern concepts, like typing quirks and plurality. When trying to implement my firebase firestore database in my app, it fails with the following error:

TypeError: firebase_app__WEBPACK_IMPORTED_MODULE_0__.default is undefined.

Here is my code in firebase.js:

import firebase from "firebase/compat/app";
import "firebase/compat/firestore";

// For Firebase JS SDK v7.20.0 and later, measurementId is optional

const firebaseConfig = {

    apiKey: "dont-steal-my-db",
  
    authDomain: "please-respond",
  
    databaseURL: "https://definition-2d49c-default-rtdb.asia-southeast1.firebasedatabase.app",
  
    projectId: "definition-2d49c",
  
    storageBucket: "definition-2d49c.appspot.com",
  
    messagingSenderId: "404265179808",
  
    appId: "1:404265179808:web:10f7b7f917d695dabb87c5",
  
    measurementId: "G-SYN64MDXL1"
  
  };

  firebase.initializeApp(firebaseConfig);

  export default firebase;

How can I fix this error, and where is a good place to go in the future for problems with firebase like these?

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

0

//try this :  

import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/firestore';

const firebaseConfig = {

apiKey: "dont-steal-my-db",

authDomain: "please-respond",

databaseURL: "https://definition-2d49c-default-rtdb.asia-southeast1.firebasedatabase.app",

projectId: "definition-2d49c",

storageBucket: "definition-2d49c.appspot.com",

messagingSenderId: "404265179808",

appId: "1:404265179808:web:10f7b7f917d695dabb87c5",

measurementId: "G-SYN64MDXL1"

};

const firebaseApp = firebase.initializeApp(firebaseConfig);
export const db = firebaseApp.firestore();
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!