MongoDB and Mongoose - General

Tell us what’s happening:

I’m getting this warning even though my tests are passing:

DeprecationWarning: The URL mongodb://,, is invalid. Future versions of Node.js will throw an error.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

MongoDB and Mongoose - Create and Save a Record of a Model

It is just a deprecation warning.

If you update Mongoose to the latest version, it fixes it. Just don’t do that with any of the challenges that depend on a specific Mongoose version.

Also, if you update Mongoose you can remove the options object from the connect method as those options are also deprecated in the latest version.

{ useNewUrlParser: true, useUnifiedTopology: true }

For these challenge, leave the version alone and just ignore the deprecation warning.