MongoDB and Mongoose - General

Tell us what’s happening:

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

DeprecationWarning: The URL mongodb://amoagh_gopinath:brxWpll15lMrm1To@ac-srhbfsq-shard-00-00.9kup2cs.mongodb.net:27017,ac-srhbfsq-shard-00-01.9kup2cs.mongodb.net:27017,ac-srhbfsq-shard-00-02.9kup2cs.mongodb.net:27017/?ssl=true&retryWrites=true&w=majority&appName=Cluster0&authSource=admin&replicaSet=atlas-j08s2t-shard-0 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/125.0.0.0 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.