Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

236
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda