Skip to content

Conversation

@abrarhayat
Copy link

We were getting a deprecation warning on connecting to Mongoose

(node:17966) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.

We were also getting deprecation warnings on functions used on Mongoose Models

(node:20379) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead

(node:20379) DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.

Adding these updates should prevent failures in the future.

@abrarhayat abrarhayat marked this pull request as ready for review February 26, 2021 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant