I am using Mongoose with my Node.js app and this is my configuration:
mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true, useUnifiedTopol
Use the following code to avoid that error
MongoClient.connect(connectionString, {useNewUrlParser: true, useUnifiedTopology: true});