MongooseError: Model.find() no longer accepts a callback
Mongoose 7+ removed callback support from queries; they return promises.
MongooseError: Model.find() no longer accepts a callbackModel.findOne() no longer accepts a callbackQuery.prototype.exec() no longer accepts a callbackModel.prototype.save() no longer accepts a callbackno longer accepts a callback Mongoose Meaning
Replace callbacks with await/.then(). Model.find({}, cb) becomes await Model.find({}). Same for save, exec, findOne, updateOne. Upgrade guides list all removed callback APIs.
Common causes
- Code written for Mongoose 5/6 callbacks
- Old tutorials
- Library wrappers still passing callbacks
- Express handlers with nested callbacks
- Upgraded Mongoose without refactoring
⚡ Quick fix
- Use
const docs = await Model.find({}) - Wrap in try/catch for errors
- Run a codemod/search for
, function (err
Detailed fix by platform
Node.js
const user = await User.findOne({ email }).exec();
How to diagnose
- Version — Mongoose 7+?
- Call sites — Callback style?
- Refactor — async/await?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- CastError: Cast to Date/Number/Boolean failed Mongoose: CastError: Cast to date failed for value "abc" (type string) at path "createdAt"
- MissingSchemaError: Schema hasn't been registered for model Mongoose: MissingSchemaError: Schema hasn't been registered for model "User". Use mongoose.model(name, schema)
- Mongoose ValidationError ValidationError: User validation failed: email: Path `email` is required.
Most viewed in MongoDB
- Document failed validation MongoDB: MongoServerError: Document failed validation (code 121)
- MongoParseError MongoDB: MongoParseError: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"
- bad auth : Authentication failed MongoDB: MongoServerError: bad auth : Authentication failed (code 8000 / 18)
Other ways to find it
Where this error sits
Origin: Data. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026