Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Javascript
(node:3168) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. (Use `node --trace-deprecation ...` to show where the warning was created)
user34244
Programming language:
Javascript
2021-06-28 19:24:59
0
Q:
(node:3168) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. (Use `node --trace-deprecation ...` to show where the warning was created)
Weapon X
Code:
Javascript
2021-02-04 00:35:59
mongoose.set('useCreateIndex', true);
5
Tags
use
show
node
how
create
index
Related
[W] undefined:undefined - Ruleset uses old version (version [1]). Please update to the latest version (version [2]).
(node:2496) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
(node:14372) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added to [process]. Use emitter.setMaxListeners() to increase limit
collection.ensureIndex is deprecated
deprecationwarning: mongoose
New to Communities?
Join the community