小编 Ay*_*ush的帖子

如何在 MongoDB 中删除此弃用警告以及为什么会发生这种情况?

我只是想创建一个 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.

为什么我会收到此弃用警告以及如何将其删除?

rest mongoose mongodb

21
推荐指数
1
解决办法
5204
查看次数

标签 统计

mongodb ×1

mongoose ×1

rest ×1