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

208
Views
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 answers
Answer question

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