I have built a loopback 3 app with mongodb, worked perfectly on local and vps. But I wanted to opt for the SaaS (mongodb.com and heroku.com) and now I am facing an error:
/node_modules/loopback-connector-mongodb/node_modules/mongodb/lib/utils.js:698
throw error;
^
MongoParseError: Load balancer mode requires driver version 4+
I have updated the loopback-connector-mongodb, installed mongodb 4.4.0 through npm and made sure of the compatibility.
P.S: since I am using the shared plan from mongodb.com, I cannot turn off the load balancer.
If you want to use serverless Mongo. Mongoose version should be higher than 6. To fix the above issue, update Mongoose:
npm install [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With