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

197
Vistas
can someone help me add a collection to my firebase database?

hey ive been working with a firebase database recently and im trying to add something to the data base with user input but its not working, it keeps throwing me the error: "Function CollectionReference.doc() requires its first argument to be of type non-empty string, but it was: undefined"

here is some of my code

const handleAddChannel = () => {
    const channelName = prompt("Enter a new channel name")

    if (channelName) {
        db.collection('Servers').doc(ServerId).collection('name').add({
            channelName: channelName
        })
    }
}

can anyone help? im trying to add a collection (just calling it name for simplicity)

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