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

274
Views
I get this error when I try to run this code: MongoParseError: options poolsize, usenewurlparse are not supported

This message shows up when I try to run this code. I'm following a tutorial online and am new to MERN stack.

import app from "./server.js";
import mongodb from "mongodb";
import dotenv from "dotenv";

dotenv.config(); /* configure dotenv */
const MongoClient =
  mongodb.MongoClient; /* get access to MongoClient from MongoDB */
const port = process.env.PORT || 8000; //connect port

//Connect to MongoDB
MongoClient.connect(process.env.RESTREVIEWS_DB_URI, {
  poolSize: 50,
  wtimeout: 2500,
  useNewUrlParser: true,
})
  .catch((err) => {
    console.error(err.stack);
    process.exit(1);
  })
  .then(async (client) => {
    //app.listen is used to start our web server, after connecting to the DB
    app.listen(port, () => {
      //we're listening at the port
      console.log(`listening on port ${port}`);
    });
  });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

How about remove poolSize: 50 and useNewUrlParser: true since the error told you they are not supported anymore ?

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!