-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
new featureThis change adds new functionality, like a new method or classThis change adds new functionality, like a new method or class
Milestone
Description
I am trying to list all databases useing mongodb and mongoose.
with mongodb it successesed, but with mogoose I got an error.
mongoose.connect(uri).then( connection=>{
let Admin = mongoose.mongo.Admin;
let admin = new Admin(connection.db);
console.log({ admin }); //s: { db: undefined, topology: undefined, promiseLibrary: undefined }
console.log({ dbs: admin.listDatabases() });
})
but I got the following error:
Cannot read property 's' of undefined
I'm using the last version of mongoose.
Metadata
Metadata
Assignees
Labels
new featureThis change adds new functionality, like a new method or classThis change adds new functionality, like a new method or class