Using mongodb-4.0.10 and mongoose-5.2.10
Added useFindAndModify: false
to the mongoose configuration to avoid warnings like:
DeprecationWarning: Mongoose:
findOneAndUpdate()
andfindOneAndDelete()
without theuseFindAndModify
option set to false are deprecated.DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead.
But now 'the options [useFindAndModify] is not supported' is coming on running the app.