Moongose connection error with Mongodb Atlas

Hi team,

I am currently trying to use mongodb with nodejs and keep on getting MongoParseError: Load balancer mode requires driver version 4+ error. For testing purpose, the DB is open to world 0.0.0.0 and still this is not connecting.

Any help here?

Welcome to the MongoDB Community Forums @Security_Labs !

Based on the error message it sounds like you are trying to connect to an Atlas Serverless instance using an older version of the Node.js driver. For Atlas Serverless you will need a minimum of Node.js 4.1.0 driver (see Minimum Driver Versions for Serverless Instances). Since the title of your topic mentions Mongoose, you will also need Mongoose 6.0 or newer (which depends on the 4.1.x MongoDB Node.js driver).

If you aren’t using Atlas Serverless, please provide some more information including:

  • version of Node.js
  • version of MongoDB Node.js driver
  • version of Mongoose
  • tier of your Atlas cluster (eg M0, M10, …)

Thanks,
Stennie

3 Likes