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

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

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