Riferimento:https://mongoosejs.com/docs/deprecations.html
Aggiungi parametro:useFindAndModify:false
Es. Codice:
mongoose.connect(
MONGODB_URL, {
useFindAndModify: false
},
(err, db) => {
if (err) throw err;
console.log(`MongoDB connected on port ${MONGODB_PORT}`);
}
);