DeprecationWarning: option useUnifiedTopology to MongoClient.connect
(node:9048) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to MongoClient.connect.
at parseFn (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/mongodb/lib/operations/connect.js:312:5)
at parseConnectionString (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/mongodb/lib/core/uri_parser.js:628:3)
at connect (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/mongodb/lib/operations/connect.js:266:3)
at ConnectOperation.execute (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/mongodb/lib/operations/connect.js:191:5)
at executeOperation (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/mongodb/lib/operations/execute_operation.js:94:26)
at MongoClient.connect (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/mongodb/lib/mongo_client.js:216:10)
at MongoDB.connect (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/loopback-connector-mongodb/lib/mongodb.js:298:62)
at Object.initializeDataSource [as initialize] (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/loopback-connector-mongodb/lib/mongodb.js:115:28)
at DataSource.setup (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/loopback-datasource-juggler/lib/datasource.js:502:19)
at new DataSource (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/loopback-datasource-juggler/lib/datasource.js:138:8)
at Registry.createDataSource (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/loopback/lib/registry.js:364:12)
at dataSourcesFromConfig (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/loopback/lib/application.js:570:19)
at Function.app.dataSource (/home/herberts/Projects/workspace/aegon/platform-api/node_modules/loopback/lib/application.js:269:14)
at /home/herberts/Projects/workspace/aegon/platform-api/node_modules/loopback-boot/lib/executor.js:191:9
at /home/herberts/Projects/workspace/aegon/platform-api/node_modules/loopback-boot/lib/executor.js:282:5
at Array.forEach (
any fix for this issue ! ? datasources.json
{
"db": {
"name": "db",
"connector": "memory"
},
"MongoDB": {
"host": "localhost",
"port": 27017,
"url": "mongodb://localhost:27017/renoom",
"database": "renoom",
"password": "",
"name": "MongoDB",
"user": "",
"useNewUrlParser": true,
"useUnifiedTopology": true,
"connector": "mongodb"
}
}
I'm waiting to approve.
https://github.com/strongloop/loopback-connector-mongodb/pull/541
keep in mind that in the case {useUnifiedTopology: true} of connection with mongo never restores https://jira.mongodb.org/browse/NODE-2147
Problem Fixed... Use this @herbertscruz Mongodb deprecated current server and engine monitoring method , So you need to use new server and engine monitoring method.. So use
{ useUnifiedTopology:true }
mongoose.connect(process.env.test_db, { useUnifiedTopology: true, useNewUrlParser: true, useCreateIndex: true });
Ref: https://stackoverflow.com/a/57900760/11873380
mongoose.connect('mongodb://localhost:27017/
Is this going to get merged into v3 as well?
@carlos-peru Can you cherry-pick the commits and submit a patch for 3.x branch?
@raymondfeng done: #548
Thanks
Thanks a lot :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.
thank you very much for working on this error add this line in my package.json. I can now use useUnifiedTopology. Seriously thank you very much, I was about to upload a fix to my private repository. I save myself a lot of headaches
line: "loopback-connector-mongodb": "git + https: //github.com/strongloop/loopback-connector-mongodb.git#v5.1.0"