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

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

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 Relatório

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 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