Answers for "DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: ht tps://mongoosejs.com/docs/deprecations.html#findandmodify"

1

DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#findandmodify

mongoose.connect(uri, { useFindAndModify: false });
Posted by: Guest on June-27-2021

Code answers related to "DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: ht tps://mongoosejs.com/docs/deprecations.html#findandmodify"

Browse Popular Code Answers by Language