You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MongoParseError: options usecreateindex, usefindandmodify are not supported
at parseOptions (C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongodb\lib\connection_string.js:290:15)
at new MongoClient (C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongodb\lib\mongo_client.js:64:63)
at C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\connection.js:801:16
at new Promise ()
at NativeConnection.Connection.openUri (C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\connection.js:798:19)
at C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\index.js:380:10
at C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\helpers\promiseOrCallback.js:32:5
at new Promise ()
at promiseOrCallback (C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:10)
at Mongoose._promiseOrCallback (C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\index.js:1225:10) {
[Symbol(errorLabels)]: Set(0) {}
}
The text was updated successfully, but these errors were encountered:
return mongoose.connect(
"mongodb+srv://redbus_db_user_1:[email protected]/redbus?retryWrites=true&w=majority",
{
useCreateIndex: true,
useNewUrlParser: true,
useUnifiedTopology: true,
useFindAndModify: false,
}
);
};
These changes allow you to handle MongoDB connection events correctly and avoid the errors related to listening to events on the Db class.
MongoParseError: options usecreateindex, usefindandmodify are not supported
at parseOptions (C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongodb\lib\connection_string.js:290:15)
at new MongoClient (C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongodb\lib\mongo_client.js:64:63)
at C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\connection.js:801:16
at new Promise ()
at NativeConnection.Connection.openUri (C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\connection.js:798:19)
at C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\index.js:380:10
at C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\helpers\promiseOrCallback.js:32:5
at new Promise ()
at promiseOrCallback (C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:10)
at Mongoose._promiseOrCallback (C:\Users\Intel\Downloads\redbus\back-end-redbus\node_modules\mongoose\lib\index.js:1225:10) {
[Symbol(errorLabels)]: Set(0) {}
}
The text was updated successfully, but these errors were encountered: