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

278
Views
Why getting firebase is not defined error?

Here's the code for the firebase.js file where I'm getting this error in spite of strictly adhering to the official documentation of Firebase.

firebase.js

import { initializeApp } from 'firebase/app';
import { getFirestore ,getDocs} from 'https://www.gstatic.com/firebasejs/9.6.3/firebase-firestore.js' 
import { collection} from 'https://www.gstatic.com/firebasejs/9.6.3/firebase-firestore.js' 
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries

// Your web app's Firebase configuration
const firebaseConfig = {
  // Configuration
};

// Initialize Firebase
firebase.initializeApp(firebaseConfig);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can follow the Firebase documentation on initializing Cloud Firestore:

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

// TODO: Replace the following with your app's Firebase project configuration
// See: https://firebase.google.com/docs/web/learn-more#config-object
const firebaseConfig = {
    // ...
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);

// Initialize Cloud Firestore and get a reference to the service
const db = getFirestore(app);

You can refer to this documentation to get started in your Cloud Firestore application.

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!