DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
See original GitHub issueAfter update to version 5.2.9
I’m getting this message in console all the time, when I start my web app:
DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
And I don’t use neither of them.
Issue Analytics
- State:
- Created 5 years ago
- Comments:32 (1 by maintainers)
Top Results From Across the Web
(node:63208) DeprecationWarning: collection.ensureIndex is ...
I am not using ensureIndex or createIndex in my Nodejs application anywhere. I am using yarn package manager. Here is my code in...
Read more >collection.ensureIndex is deprecated. Use createIndexes ...
NodeJS: mongoose Deprecation Warning: collection.ensureIndex is deprecated. Use createIndexes instead ... (node:73172) DeprecationWarning: collection.
Read more >collection.ensureindex is deprecated. use createindexes ...
deprecationwarning : collection.ensureindex is deprecated. use createindexes instead. · Oops, You will need to install Grepper and log-in to perform this action.
Read more >(node:63208) DeprecationWarning: collection.ensureIndex is ...
Node.js – (node:63208) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. mongodbmongoosenode.js.
Read more >Authentication and Authorization - 3 - Code with Mosh Forum
“(node:11412) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. (Use node --trace-deprecation ... to show ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
After upgrading to version 5.2.10. Any of the options below should stop the warnings?
or
It didnt work here. (Sorry if I did something wrong)
@nonniv upgrade to 5.2.10 and set
mongoose.set('useCreateIndex', true);