Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

139
Views
DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version

I am using mongoose and mocha for MongoDB schema design and API development I am getting this warning... what does this mean, how it will affect me and what is the fix??

Below the actual warning text:

(node:9872) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

UPDATE

mongodb@3.6.5 is out.

Just update mongodb driver and mongoose:

npm i mongodb mongoose

This is caused by the mongodb@3.6.4 native driver which is used by mongoose.

#1 You can downgrade mongodb to version 3.6.3 (described here).

#2 Or downgrade mongoose from 5.11.16 back to 5.11.15:

npm uninstall mongoose
npm install mongoose@5.11.15

#3 Or just wait for the release of mongodb@3.6.5.

over 4 years ago · Santiago Trujillo Report

0

For all those looking for an answer for this, there is a question posted on Mongodb forum and the answer is acknowledged by Mongodb concerned person.

The answer given by @kmgt is correct. The error can be ignored safely and will be fixed in upcoming release of Mongodb Nodejs driver or downgrading Mongoose version to 5.11.15 will help.

(node:44612) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version

over 4 years ago · Santiago Trujillo Report

0

Same Error enter image description here

But As far as I know its a new version compatibility bug, after searching about this current bug version, I found this comment session and according to one of them, it is safe to ignore this warning.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!