Mongodb deleteOne()

Mongodb deleteOne()
0

Someone please help me . I am using Mongodb deleteOne() function .

here is the code=>

 var id=req.body._id;

 client.db('test').collection(project).deleteOne({_id:ObjectId(id)},(err,doc)=>{
                if(err){return err}
                else{res.send('success deleted id : '+id)}
              })

Why it is showing following error in console?

the options [servers] is not supported

the options [caseTranslate] is not supported

the options [dbName] is not supported

the options [credentials] is not supported

the options [servers] is not supported

the options [caseTranslate] is not supported

the options [dbName] is not supported

the options [credentials] is not supported

the options [username] is not supported

the server/replset/mongos/db options are deprecated, all their options are supported at the top level of the options object [poolSize,ssl,sslValidate,sslCA,sslCert,sslKey,sslPass,sslCRL,autoReconnect,noDelay,keepAlive,keepAliveInitialDelay,connectTimeoutMS,family,socketTimeoutMS,reconnectTries,reconnectInterval,ha,haInterval,replicaSet,secondaryAcceptableLatencyMS,acceptableLatencyMS,connectWithNoPrimary,authSource,w,wtimeout,j,forceServerObjectId,serializeFunctions,ignoreUndefined,raw,bufferMaxEntries,readPreference,pkFactory,promiseLibrary,readConcern,maxStalenessSeconds,loggerLevel,logger,promoteValues,promoteBuffers,promoteLongs,domainsEnabled,checkServerIdentity,validateOptions,appname,auth,user,password,authMechanism,compression,fsync,readPreferenceTags,numberOfRetries,auto_reconnect,minSize,monitorCommands,retryWrites,useNewUrlParser,useUnifiedTopology,serverSelectionTimeoutMS,useRecoveryToken]

the options [source] is not supported

the options [mechanism] is not supported

the options [mechanismProperties] is not supported