(node:14800) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. (Use node --trace-deprecation ... to show where the warning was created)

111

(node:2496) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. -

/*As of this edit, Mongoose is now at v5.4.13. Per their docs, these are the fixes for the deprecation warnings..*/
mongoose.set('useNewUrlParser', true);
mongoose.set('useFindAndModify', false);
mongoose.set('useCreateIndex', true);

(node:2496) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. -

mongoose.set('useNewUrlParser', true);
mongoose.set('useFindAndModify', false);
mongoose.set('useCreateIndex', true);

Comments

Submit
0 Comments