You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite loopback-connector-mongodb documentation shows support for mongodb+srv the problem is that the node_module that comes with loopback-connector-mongodb (even with 6.2.0) is the mongodb package 3.7.0 and not 4.x ...
In reality loopback-connector-mongodb does not support mongodb+srv:// URI may be to that issue.
To replicate just create a lb4 application, add a mongodb datasource but instead of using mongodb:// try using the mongodb+srv URI for instance that is the ones available for MongoDB ATLAS Cloud service.
Thanks
Joao
Logs
Migrating schemas (alter existing schema)
Cannot migrate database schema MongoParseError: Load balancer mode requires driver version 4+
at QueryReqWrap.callback (~project/node_modules/loopback-connector-mongodb/node_modules/mongodb/lib/core/uri_parser.js:111:27)
at QueryReqWrap.onresolve [as oncomplete] (node:dns:215:10)
Thanks for opening an issue, @jricardooliveira. It's something that's been under our radar for a while, but didn't have the resources to execute earlier.
Describe the bug
Hi,
When trying to connect with cluster protocol to mongodb with the URI mongodb+srv:// after npm migrate it will fail with:
"Cannot migrate database schema MongoParseError: Load balancer mode requires driver version 4+"
Despite loopback-connector-mongodb documentation shows support for mongodb+srv the problem is that the node_module that comes with loopback-connector-mongodb (even with 6.2.0) is the mongodb package 3.7.0 and not 4.x ...
In reality loopback-connector-mongodb does not support mongodb+srv:// URI may be to that issue.
To replicate just create a lb4 application, add a mongodb datasource but instead of using mongodb:// try using the mongodb+srv URI for instance that is the ones available for MongoDB ATLAS Cloud service.
Thanks
Joao
Logs
Additional information
Connection config:
const config = {
name: 'pinnersDS',
protocol: 'mongodb+srv',
url: 'mongodb+srv://myuseradm:[email protected]/?retryWrites=true&w=majority',
useNewUrlParser: true
};
Reproduction
Obvious enought
The text was updated successfully, but these errors were encountered: