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

214
Vistas
How to connect client with MongoDB?

I was trying to connect my client with MongoDB, but I got an error: MongoParseError: option useunifedtopology is not supported. I don't know why this is happening, I will be very grateful for your help, this is my code:

const { Databse } = require("../../config.json");

module.exports = {
    name: "ready",
    once: true,
    execute(client) {
        console.log("The client is now ready!");

        if(!Databse) return;
        mongoose.connect(Databse, {
            useNewUrlParser: true,
            useUnifedTopology: true
        }).then(() => {
            console.log("The client is now connected with the Database!")
        }).catch((err) => {
            console.log(err)
        })
    }    
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Once again, the error is caused due to a typo. Please just, before posting a question, go through your code to see if there are any potential typos here and there. Here, when calling the mongoose.connect() function you are giving it an option called useUnifedTopology without an 'i' in the 'unifed'. So, you can just correct that and you should be good to go

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