Answer a question

I'm developing a LoopBack backend for Ionic frontend. It uses MongoDB as a database.

In package.json, I've tried to upgrade the dependency loopback-connector-mongodb upto ^3.6.0 from ^3.4.1, but I faced this caution.

DeprecationWarning: collection.insert is deprecated. Use insertOne, insertMany or bulkWrite instead.

However, I've still found no solution yet so that I guess I've got to downgrade again. (If so, no such caution ¯_(ツ)_/¯ )

Any better solution? Thanks.

Answers

I've found some github issues below to get convinced that this problem has been fixed for now.

  • DeprecationWarning: collection.insert is deprecated
  • Replace deprecated commands

Now I've upgraded the version with ^4.2.0 and everything seems to be okay.

Thanks

Logo

WooCommerce社区为您提供最前沿的新闻资讯和知识内容

更多推荐