We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
The text was updated successfully, but these errors were encountered:
I have getting the same issue
Sorry, something went wrong.
add mongoose.set("useCreateIndex", true)
mongoose.set("useCreateIndex", true)
When you connect your mongoose.connect() add useCreateIndex : true, so your code should look like this.
useCreateIndex : true,
mongoose.connect('mongodb URL goes here' , { useCreateIndex : true, useFindAndModify:true, useNewUrlParser :true, useUnifiedTopology : true })
No branches or pull requests
DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
The text was updated successfully, but these errors were encountered: