DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version
See original GitHub issueI got some deprecation warning
OS : macOS 11.2 Big Sur Monk : Latest 7.3.3 Mongodb : Latest 3.6.4
(node:58674) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version.
at /Users/forte/Workspace/freejs/node_modules/monk/lib/manager.js:150:18
at Array.forEach (<anonymous>)
at Manager.<anonymous> (/Users/forte/Workspace/freejs/node_modules/monk/lib/manager.js:149:95)
at /Users/forte/Workspace/freejs/node_modules/mongodb/lib/utils.js:693:5
at /Users/forte/Workspace/freejs/node_modules/mongodb/lib/mongo_client.js:227:7
at connectCallback (/Users/forte/Workspace/freejs/node_modules/mongodb/lib/operations/connect.js:366:5)
at /Users/forte/Workspace/freejs/node_modules/mongodb/lib/operations/connect.js:602:5
at Object.connectHandler [as callback] (/Users/forte/Workspace/freejs/node_modules/mongodb/lib/core/sdam/topology.js:297:43)
at processWaitQueue (/Users/forte/Workspace/freejs/node_modules/mongodb/lib/core/sdam/topology.js:1048:21)
at NativeTopology.serverUpdateHandler (/Users/forte/Workspace/freejs/node_modules/mongodb/lib/core/sdam/topology.js:567:7)
at Server.emit (events.js:315:20)
at Server.EventEmitter.emit (domain.js:467:12)
at Monitor.<anonymous> (/Users/forte/Workspace/freejs/node_modules/mongodb/lib/core/sdam/server.js:151:12)
at Monitor.emit (events.js:327:22)
at Monitor.EventEmitter.emit (domain.js:467:12)
at /Users/forte/Workspace/freejs/node_modules/mongodb/lib/core/sdam/monitor.js:272:13
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Listening to events on the Db class has been deprecated and ...
(node:44612) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version.
Read more >Listening to events on the Db class has been deprecated and ...
Deprecation Warning Listening to events on the Db class has been deprecated and will be removed in the next major version. Fix: So...
Read more >Listening to events on the Db class has been deprecated and ...
Node.js – DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version.
Read more >Mongoose v6.8.1: Deprecation Warnings
There are several deprecations in the MongoDB Node.js driver that Mongoose users should be aware of. Mongoose provides options to work around these ......
Read more >listening to events on the db class has been deprecated and ...
1 You can downgrade mongodb to version 3.6.3 #2 Or downgrade mongoose from 5.11.16 back to 5.11.15: npm uninstall mongoose npm install mongoose@5.11.15...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi! I tried this but I’m still receiving the warning. I tried all other solutions above as well… Anyone who found a fix yet?
It’s a shame that we have not received any reply from the developers of this framework, stating how to resolve this issue or at least letting us know they are working on it.
It’s a pain in the ass when you’re debugging your program and all you see is that you’re being spammed by these errors.
Someone, please tell me how to disable these errors, I don’t care if they’re just ignored or if the code is fixed, I JUST DONT WANT TO SEE THEM. Thanks.