title: How can I remove this deprecation warning in MongoDB and why is it happening?
body: <p>I am just trying to create an API and connect to it inside my app.js file but every time I run app.js I am getting this deprecation warning. I have checked all of the deprecation warnings in mongoose and MongoDB but I cannnot find any that match mine. The warning that I am getting is,</p>
  <p><code>(node:16864) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency</code></p>
  <p><code>(Use node --trace-warnings ... to show where the warning was created)</code></p>
  <p><code>(node:16864) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version.</code></p>
  <p>Why am I getting this deprecation warning and how can I remove it?</p>