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

158
Vistas
firebase - Uncaught TypeError: Cannot read properties of undefined (reading 'options')

I need to setup firebase and firestore in my vue app. I've created a folder named firebase inside the src of my project and inside it I've a file named init.js

I've this code inside the file, but I'm unable to start the firebase ui from my login component

import { initializeApp } from 'firebase/app'
import { getFirestore } from 'firebase/firestore'
import * as firebaseui from 'firebaseui'

const config = {
    apiKey: "....",
    authDomain: "...firebaseapp.com",
    databaseURL: "...firebaseio.com",
    projectId: "...",
    storageBucket: "..",
    messagingSenderId: "...",
    appId: "...",
    measurementId: "..."
}


const app = initializeApp(config)
const db = getFirestore()
const ui = new firebaseui.auth.AuthUI(app)


export { db, ui }

When I'm importing the ui const in my component I will get this error: Uncaught TypeError: Cannot read properties of undefined (reading 'options')

How I can fix this?

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

0

As explained in the doc, you need to pass the Firebase App object (i.e. app) to the getFirestore() method.

const app = initializeApp(config)
const db = getFirestore(app)
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