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

237
Views
Uncaught FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app). - In React.js

When i look up this error its with flutter or React Native. All the the solutions I have come across did not help.

I have also done it like this ๐Ÿ‘‡. If i do i get a - Maximum call stack size exceeded error

const app = firebase.initializeApp(firebaseConfig) 

Any help will be appreciated.

import {firebase} from './firebase'
import {getFirestore} from 'firebase/firestore'
import {getStorage} from 'firebase/storage'


const firebaseConfig ={
    apiKey: "",
    authDomain: "",
    projectId: "",
    storageBucket: "",
    messagingSenderId: "",
    appId: "",
    measurementId: ""
};


const db = getFirestore()
const storage = getStorage()
const app = !getApps().length ? initializeApp(firebaseConfig) : getApp()




export {db,storage,firebase,app}

    
about 4 years ago ยท Juan Pablo Isaza
1 answers
Answer question

0

I'm not totally sure what is being imported as firebase at the top, but you must initialize Firebase before any other service but currently it's the opposite way. Try refactoring the order of statements as shown below:

// import { firebase } from './firebase'
import { getFirestore } from 'firebase/firestore'
import { getStorage } from 'firebase/storage'


const firebaseConfig = {...};

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

const db = getFirestore()
const storage = getStorage()

export {db, storage, firebase, app}

Also if that ./firebase file just has this statement firebase.initializeApp(firebaseConfig) which is older syntax then can you try removing the file?

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!