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

347
Views
FirebaseError no detectado: Firebase: no se ha creado la aplicación Firebase '[DEFAULT]'; llame a Firebase App.initializeApp() (app/no-app). HTML y JavaScript

He visto muchos sitios web (que incluyen StackOverflow) sobre el mismo error con sus soluciones, pero ninguno de ellos me ha funcionado.

Sé que el error significa que ejecuté una función usando firebase antes de que se inicializara.

Aquí están las partes relevantes de mi código:

 window.addPerson = addPerson; const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const userVar = urlParams.get('user') const userVarSplitted = userVar.split('#') const userVarFormatted = userVarSplitted[0] + ":" + userVarSplitted[1] // Import the functions you need from the SDKs you need import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.4/firebase-app.js"; import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.6.4/firebase-analytics.js"; import { getDatabase, ref, set } from "https://www.gstatic.com/firebasejs/9.1.0/firebase-database.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 // For Firebase JS SDK v7.20.0 and later, measurementId is optional const firebaseConfig = { apiKey: "AIzaSyC6KGzXriv7IoQzcayPlzi-Xt_eRLgOqko", authDomain: "jerrybot-fa77f.firebaseapp.com", databaseURL: "https://jerrybot-fa77f-default-rtdb.europe-west1.firebasedatabase.app", projectId: "jerrybot-fa77f", storageBucket: "jerrybot-fa77f.appspot.com", messagingSenderId: "374262858544", appId: "1:374262858544:web:7971e56f62fab12631fef5", measurementId: "G-JQTEB5NDRE" }; // Initialize Firebase const app = initializeApp(firebaseConfig); if (app.length === 0) { console.log("no firebas app") }else{ console.log("initialized") } const analytics = getAnalytics(app); const db = getDatabase(); function addPerson() { set(ref(db, "verified/" + userVarFormatted), { name: userVarSplitted[0], discriminator: userVarSplitted[1] }); console.log("added") }

Dice Initialized en la consola, lo que significa que la aplicación existe. ¿Sabes lo que está pasando?

PD: el tipo de javascript está configurado para module

¿Sabes lo que está pasando? Gracias

about 4 years ago · Juan Pablo Isaza
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!