Why am I getting the MongoParseError for usecreateindex and usefindandmodify options, and how can I resolve this issue? What are the correct options to use with Mongoose for these configurations?
C:UsersAsusDesktopstudentManagementSystem 2node_modulesmongodblibconnection_string.js:272
throw new error_1.MongoParseError(${optionWord} ${Array.from(unsupportedOptions).join(', ')} ${isOrAre} not supported
);
^
MongoParseError: options usecreateindex, usefindandmodify are not supported
at parseOptions (C:UsersAsusDesktopstudentManagementSystem 2node_modulesmongodblibconnection_string.js:272:15)
at new MongoClient (C:UsersAsusDesktopstudentManagementSystem 2node_modulesmongodblibmongo_client.js:51:63)
at NativeConnection.createClient (C:UsersAsusDesktopstudentManagementSystem 2node_modulesmongooselibdriversnode-mongodb-nativeconnection.js:306:14)
at NativeConnection.openUri (C:UsersAsusDesktopstudentManagementSystem 2node_modulesmongooselibconnection.js:823:34)
at Mongoose.connect (C:UsersAsusDesktopstudentManagementSystem 2node_modulesmongooselibmongoose.js:429:15)
at Object. (C:UsersAsusDesktopstudentManagementSystem 2server.js:17:11)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12) {
[Symbol(errorLabels)]: Set(0) {}
}
i want to solve this error
Thisanka Rivindu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.