DeprecationWarning: Mongoose:
findOneAndUpdate () and
findOneAndDelete () without the
useFindAndModify option set to false are deprecated
official website: https://mongoosejs.com/docs/deprecations.html
solve
entrance file added
mongoose.set('useFindAndModify', false)