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

483
Views
Firebase Question - Uncaught TypeError: firebaseApp.firestore is not a function
import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';


const firebaseConfig = {
  projectId: "projectId"
};

const firebaseApp = firebase.initializeApp(firebaseConfig);

const db = firebaseApp.firestore();
const auth = firebase.auth();

export { db, auth };
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

To fix your error, you need to add import 'firebase/compat/firestore' under your import statements. Also, check the documentation to update imports to v9 compat.

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


const firebaseConfig = {
    ...
};

const firebaseApp = firebase.initializeApp(firebaseConfig);

const db = firebaseApp.firestore();
const auth = firebase.auth();

export { db, auth };
about 4 years ago · Juan Pablo Isaza Report

0

You first need to import Firestore SDK to use it. Try adding the following import below auth:

import "firebase/compat/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!