Mongoose.prototype.connect() no longer accepts a callback How to use mongoose in NodeJS without callback. Why mongoose giving callback error mongoose started giving error. node .\app.js \nodejs and database\projection\node_modules\mongoose\lib\index.js:400 throw new MongooseError('Mongoose.prototype.connect() no longer accepts a callback'); ^ MongooseError: Mongoose.prototype.connect() no longer accepts a callback at Mongoose.connect (D:\github\workshop-content\nodeJS-interview-questions\nodejs and database\projection\node_modules\mongoose\lib\index.js:400:11) at Object.anonymous (D:\github\workshop-content\nodeJS-interview-questions\nodejs and database\projection\app.js:11:10) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 Node.js v18.16.1 NodeJS mongoose data fetch from MongoDB Video for Projection: How to use MongoDB with NodeJS Best MongoDB ODM Mongoose integration in NodeJS Getting data from MongoDB in NodeJS GitHub Repository Link: https://github.com/sayedazharsabri/wo... #bestway #solvederror #realway #nodejsmongoose #nodejsmongodb #nodejsnosql #learninhindi #bestteacher #kahanseseekhein #programmingseekhnekaasaantareeka #programmingforall #codeeasily #asanisekaiseseekhein #easyway #easiestway #bestway #withexample #realway #realimplementation #modernway #CodeByHeart #code by heart #sayed azhar sabri #sayedazharsabri #azharsir #AzharSir #hindi #urdu