0
点赞
收藏
分享

微信扫一扫

(node:2612) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.

(node:2612) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.

虽然数据库连接成功 但是看着这警告有点不舒服

(node:2612) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead._mongodb

解决办法

只需要在在options中添加:useCreateIndex: true就可以解决此问题

(node:2612) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead._bug_02

哈哈哈哈哈 成功解决

(node:2612) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead._数据库_03


举报

相关推荐

0 条评论