DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
Problem
After 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.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
After upgrading to version 5.2.10. Any of the options below should stop the warnings? [code block]` or [code block]` It didnt work here. (Sorry if I did something wrong)
Trust Score
9 verifications
- 1
After upgrading to version 5.2.10. Any of the options below should stop the warn
After upgrading to version 5.2.10. Any of the options below should stop the warnings?
- 2
[code block]`
or [code block]` It didnt work here. (Sorry if I did something wrong)
Validation
Resolved in Automattic/mongoose GitHub issue #6890. Community reactions: 126 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep