I’m having problems with a Deprecation Warning error in Glitch’s log window when checking my solution. The full error is:
(node:18146) DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.
I’ve found that collection.remove is called several times in the included server.js file, including in the routing endpoint that looks to be associated with this exercise. While this file is labeled not to modify, I tried it out to see if it would fix my problem by replacing
.deleteMany. When I checked my solution this way, I received a timeout error on the challenge page (and no deprecation warning).
I’d very much like to wrap up the MongoDB/Mongoose challenges soon, and any help to get there is appreciated.
(In addition, there is still a DeprecationWarning for calling mongoose.connect() with only the connection URI and no
useNewUrlParser flag set, as mentioned in some other threads.)