Node js driver version conflicts with Mongo 3.6

I’m running into problems trying to connect a Node js back end to Mongo db (v3.6) using Mongoose. According the Mongo compatibility docs (https://www.mongodb.com/docs/drivers/node/current/compatibility/) Mongo 3.6 should still be reachable using the Node driver v6.8 or lower. However, I have mongodb@6.0 installed in my project and I still receive the following error:

“Server at [connection string] reports maximum wire version 6, but this version of the Node.js Driver requires at least 7 (MongoDB 4.0)”

Here’s a look at my package.json:

Any ideas what else I’m missing?

UPDATE:

  • I tried uninstalling Mongo v8.0 from my computer (Windows 10), and installed Mongo 6.0 AND even set the new mongo version path in my environment variables and still no luck.

As of Node.js Driver 6.10.0 the minimum version of MongoDB required is 4.0 (see NODE-5838). Check your package-lock.json to see if maybe you’re using 6.10.0+ of the driver, as 6.9.0 and earlier should continue to work with MongoDB 3.6.

1 Like

This was the problem, thank you! Mongoose installs mongodb as a dependency and Mongoose v8.x.x has a minimum of mongo@6.10. Downgrading Mongoose to v7 or lower will allow connection mongo 3.6.