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

361
Views
No detectado (en promesa) TypeError: Object(...)(...).once no es una función

Hola necesito ayuda con esto dice que

No detectado (en promesa) TypeError: Object(...)(...).once no es una función en eval (store.js?07a4:42:1) en eval (index-6de4cbb9.js?4d2d:2453: 1)

Aquí está mi código:

 import { firebaseAuth, firebaseDb } from 'boot/firebase' import { createUserWithEmailAndPassword, signInWithEmailAndPassword,onAuthStateChanged } from "firebase/auth"; import { ref, set } from "firebase/database"; const state = { } const mutations = { } const actions = { registerUser({}, payload) { createUserWithEmailAndPassword(firebaseAuth, payload.email, payload.password) .then(response => { console.log(response) const userId = firebaseAuth.currentUser.uid set(ref(firebaseDb, 'users/' + userId), { name: payload.name, email: payload.email, online: true }) }).catch(error => { console.log(error.message) }) }, loginUser({}, payload) { signInWithEmailAndPassword(firebaseAuth, payload.email, payload.password) .then(response => { console.log(response) }).catch(error => { console.log(error.message) }) },

Aquí está la parte que es error:

 handleAuthStateChanged() { onAuthStateChanged(firebaseAuth, user => { if (user) { // User is signed in, see docs for a list of available properties // https://firebase.google.com/docs/reference/js/firebase.User const userId = firebaseAuth.currentUser.uid ref(firebaseDb, 'users/' + userId).once('value', snapshot => { console.log('snapshot: ', snapshot) }) // ... } else {

El usuario ha cerrado la sesión

 // ... } }) } } const getters = { } export default { namespaced: true, state, mutations, actions, getters }

no lo entiendo todavía recibí este tipo de error

 <script> import { mapActions } from "vuex" export default { methods: { ...mapActions('store', ['handleAuthStateChanged']) }, mounted(){ this.handleAuthStateChanged() } } </script>

este es mi script App.vue

error

código completo

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!