5

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.

1 Answer 1

1

if u want to use serverless mongo. mongoose version should be higher than 6. To fix the above issue update the mongoose

npm install [email protected]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.