Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

360
Vistas
Vue connecting to firebase - uncaught FirebaseError: "projectId" not provided in firebase.initilializeApp

I'm following this twitter clone (using Vue) tutorial, and on about 01:30:00 he connects his app to firebase.

  1. I created firebase DataBase, and copied the firebase parameters.

  2. I entered a dummy document to the Database.

  3. I cloned the GitHub repo for this project, and changed the 'firebase.js' file with the firebase parameters.

This is the firebase.js:

import firebase from "firebase/app"
import "firebase/firestore"

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

firebase.initializeApp(firebaseConfig)

let db = firebase.firestore()

export default db

And I got the following error (in chrome on 'localhost:8080'):

Uncaught FirebaseError: "projectId" not provided in firebase.initializeApp.
    at new n (prebuilt-306f43d8-45d6f0b9.js?fef0:188)
    at eval (prebuilt-306f43d8-45d6f0b9.js?fef0:14819)
    at n.t (prebuilt-306f43d8-45d6f0b9.js?fef0:14821)
    at new n (prebuilt-306f43d8-45d6f0b9.js?fef0:15414)
    at eval (index.js?1c42:69)
    at Component.eval [as instanceFactory] (index.js?1c42:66)
    at Provider.getOrInitializeService (index.esm.js?a40d:338)
    at Provider.getImmediate (index.esm.js?a40d:130)
    at FirebaseAppImpl._getService (index.esm.js?8d00:219)
    at FirebaseAppImpl.firebaseAppImpl.<computed> [as firestore] (index.esm.js?8d00:437)
  1. I changed the 'firebase.js' with the example that on the Vue website.

firebase.js:

// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
import { initializeApp } from "firebase/app";

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

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

But I still get the same error (as on section 3).

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

My guess is that the file firebase.js may not being loaded. You can check it with a

console.log('test')

inside that file.

If it is not loading I would try changing the name form firebase.js to fb.js.

about 4 years ago · Juan Pablo Isaza Denunciar

0

The problem is that the database wasn't named correctly (as demanded in the open source) - I needed to call it Qwitter.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda