Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The options [useMongoClient] is not supported

I am using mongodb-3.6.0.

My express code is

var promise = mongoose.connect('mongodb://localhost/myapp', {
  useMongoClient: true
});

On running the app I am getting the options [useMongoClient] is not supported. My mongoose version in ^5.0.0-rc0.

Please help.

like image 674
raju Avatar asked Dec 30 '17 04:12

raju


1 Answers

There is not much documentation about this yet as Mongoose 5 is in release candidate stage but with mongoose 5 you don't need to provide useMongoClient option. Mongoose 5 is using Mongo client by default. So just remove this option.

like image 64
Priidik Vaikla Avatar answered Sep 23 '22 06:09

Priidik Vaikla