-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Empty show more show less
Calling `MongoDB.connect(url, mongoOptions, cb);` callbacks with an error that is an EventEmitter. My full code is:
var MongoDB = require('mongodb'); var url = 'mongodb://<user>:<password>@<my-db-url>'; var mongoOptions = { db: { safe: true, native_parser: false }, server: { autoReconnect: true, reconnectTries: Infinity }, replSet: {} }; var cb = function (e, r) { console.log('error:', e, 'res', r); }; MongoDB.connect( url, mongoOptions, cb );
Happy to provide more context. I'm on node v4.6.1, connecting to mongo 3.2.8