我只是想创建一个 API 并在我的 app.js 文件中连接到它,但每次运行 app.js 时我都会收到此弃用警告。我已经检查了 mongoose 和 MongoDB 中的所有弃用警告,但我找不到任何与我匹配的警告。我得到的警告是,
(node:16864) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:16864) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version.
为什么我会收到此弃用警告以及如何将其删除?