ErrLookup › Automattic/mongoose

Automattic/mongoose

MongoDB object modeling designed to work in an asynchronous environment. · JavaScript · 307 source files

Analyzed at 49cdab0136 on 2026-08-21. 254 documented errors.

Code / MessageTypeSeverityTags
bulkWrite failed with
exception error bulk-write, schema-validation, ordered-false, throwonvalidationerror
Aggregate not bound to any Model
exception warning mongoose, objectid, schema-types, api-confusion, warning
Cast to DocumentArray failed for value
exception error mongoose, document-array, cast, castnonarrays, schema-option
Invalid select() argument. Must be string or object.
exception error mongoose, query, projection, select, typeerror, invalid-argument
For your own good, using `document.save()` to update an…
exception error mongoose, divergent-array, populate, projection, save, data-safety
Invalid arg " " to unwind(), must be string or object
exception warning mongoose, schema-methods, reserved-name, prototype-collision, warning
insertMany failed with
exception error mongoose, validation, insertmany, bulk, throwonvalidationerror
Aggregate `near()` must be called with non-nullish argument
exception warning mongoose, schema, reserved-name, warning, naming
.bulkSave() was not able to update of the given documents…
exception error mongoose, bulksave, versioning, optimistic-concurrency, conflict, bulk
failed with Mongoose validation errors: (operation is…
exception error mongoose, bulkwrite, validation, partial-success, bulk
Invalid atomic update value for
exception error mongoose, update, query, validation
Invalid arguments
exception warning mongoose, transactions, session, model-create, api-misuse
Connection operation buffering timed out after
exception error connection, timeout, buffering, startup
Invalid arg " " to sortByCount(), must be string or object
exception warning mongoose, jest, jsdom, test-environment, warning
If thenExpr or elseExpr is string, it must be either…
exception warning mongoose, indexes, schema, duplicate, warning
Invalid addFields() argument. Must be an object
exception error mongoose, populate, typeerror, invalid-argument, query
Options must be an object, got
exception error mongoose, query, setoptions, options, invalid-argument
Invalid project() argument. Must be string or object
exception error mongoose, internal, error-handling, typeerror, serialization
Document updateOne pre hooks cannot overwrite arguments
exception error mongoose, middleware, hooks, updateone, document
Cast to $text failed for value
validation error mongoose, text-search, full-text, query, cast
Cannot create DocumentArrayElement schematype without a…
exception error mongoose, internal, schematype, plugin, compatibility
Connection#createClient not implemented by driver
exception error connection, custom-driver, openuri, mongoose
Cannot call `create()` with a session and multiple…
exception error mongoose, transactions, session, ordered, create, mongodb
Query.prototype.findOneAndReplace() no longer accepts a…
exception error mongoose, callback, promise, migration, breaking-change, replace
Cannot call ` . ()` before initial connection is complete…
exception error mongoose, connection, buffercommands, startup, race-condition
Cast to ObjectId failed for value
validation error mongoose, objectid, cast, validation, route-params
Model.create() no longer accepts a callback
exception error mongoose, callback, promise, migration, api-change, create
Infinite subdocument loop: subdoc with _id
exception error mongoose, subdocument, circular-reference, save, infinite-loop
Invalid graphLookup() argument. Must be an object.
exception warning mongoose, jest, fake-timers, testing, warning
Aggregate pipeline for $unionWith cannot include `$out` or…
exception warning mongoose, deprecation, findoneandupdate, query-options, upgrade
Document deleteOne pre hooks cannot overwrite arguments
exception error mongoose, middleware, hooks, deleteone
Cannot have duplicate keys in discriminators with…
exception error mongoose, discriminators, encryption, csfle, queryable-encryption, schema-design
`Model. ()` cannot run without a model as `this`. Make sure…
exception error mongoose, this-context, new-misuse, statics
Provided object has both field
exception error mongoose, alias, translatealiases, conflicting-keys, query-options
Aggregate.prototype.explain() no longer accepts a callback
exception warning mongoose, deprecation, configuration, query-options, upgrade
Field ` ` is not in schema and strict mode is set to throw.
exception error mongoose, update, strict-mode, schema, typo
Cast to embedded failed for value
exception error mongoose, embedded-document, document-array, cast, subdocument
Discriminator " " not found for model
exception error mongoose, discriminators, schema, create, polymorphism
Invalid sort() argument. Must be a string or object.
exception warning mongoose, indexes, mongodb, schema, warning
`Model. ()` cannot run without a model as `this`. Make sure…
exception error mongoose, this-context, unbound-function, statics
Cast to Number failed for value
validation error mongoose, number, cast, validation, coercion
Path ` ` is immutable and strict mode is set to throw.
exception error mongoose, immutable, strict-mode, document, setters
Cast to number failed for value
exception error mongoose, update, cast-error, type-coercion, inc
Connection#setClient not implemented by driver
exception error driver, setclient, abstract-method, custom-driver
Can't use with Buffer.
exception error mongoose, buffer, query, operator, filter
Cannot overwrite ` ` model once compiled.
exception error mongoose, discriminator, model-registry, duplicate-model, hot-reload
Cannot use schema-level projections (`select: true` or…
exception error mongoose, map, schema, projection, select
Cast to Decimal128 failed for value
exception error mongoose, decimal128, cast, validation, money
a circular reference in the update value, updateValue
exception error mongoose, update, circular-reference, serialization, bson
Aggregate `near()` argument has invalid coordinates, got
exception warning mongoose, deprecation, document, change-tracking, mongoose-10
Connection#doClose unimplemented by driver
exception error driver, close, abstract-method, custom-driver
Cast to date failed for value
exception error mongoose, date, cast, validation, date-parsing
is not allowed with sanitizeFilter
exception error mongoose, security, query-injection, sanitize-filter
Field ` ` is not in schema and strict mode is set to throw.
exception error mongoose, update, strict-mode, schema, nested
Must provide `autoEncryption` when connecting with…
exception critical mongoose, csfle, queryable-encryption, autoencryption, security, mongodb
The provided class must extend Model
exception error mongoose, discriminator, inheritance, model
Cannot pass an array to query updates unless the…
exception error mongoose, query, findoneandupdate, aggregation-pipeline, update, options
Query.prototype.findOneAndUpdate() no longer accepts a…
exception error mongoose, callback, promise, migration, breaking-change, findoneandupdate
Cannot create use schema for property
exception error mongoose, schema, timeseries, embedded-document, invalid-option
Path ' ' contains the same array filter multiple times
exception error mongoose, array-filters, update, nested-arrays
2nd argument to `Model` constructor must be a POJO or…
exception error mongoose, model, schema, constructor, api-misuse
Please provide an executor function
validation error session, missing-argument, api-misuse
The 2nd parameter to `mongoose.model()` should be a schema…
validation error model, schema, invalid-argument-type, api-misuse
Arguments must be aggregate pipeline operators
exception error mongoose, model-registration, collection-name, typeerror, validation
Invalid update pipeline operator
exception error mongoose, update, pipeline, unsupported-operator, aggregation
Query has invalid `op
exception error mongoose, query, exec, invalid-op
Cast to string failed for value
validation error mongoose, cast, string, schema, query
The connection passed to `useConnection()` has a different…
exception error mongoose, connection, version-conflict, duplicate-dependency, monorepo
You have a method and a property in your schema both named
exception error mongoose, schema, methods, name-collision, model-compile
Aggregate.prototype.exec() no longer accepts a callback
exception warning mongoose, subdocument, save, nested-documents, api-misuse
document must have an _id before saving
exception error mongoose, save, id, insert, schema
listDatabases() not implemented by driver
exception error driver, listdatabases, abstract-method
Query.prototype.validate() no longer accepts a callback
exception error mongoose, callback-removed, migration, promise
Cannot mix array and object updates
exception error mongoose, query, update-pipeline, invalid-argument
The `uri` parameter to `openUri()` must be a string, got
exception critical mongoose, connection-string, env-var, configuration, startup
Field is immutable and strict = 'throw
exception error mongoose, immutable, strict-mode, update
Field ` ` is not in schema and strictRead is set to throw.
exception error mongoose, strict-read, hydration, schema, strict-mode
Invalid validator. Received
exception error mongoose, schema, custom-validator, validate
Cast to Double failed for value
exception error mongoose, double, cast, validation, bson
batchSize must be a number
exception error mongoose, cursor, eachasync, batch-size, typeerror, env-var
`useConnection()` requires a Mongoose connection.
exception error mongoose, connection, useconnection, type-mismatch
Connection.prototype.dropDatabase() no longer accepts a…
exception error dropdatabase, callbacks, migration, mongoose-7
Could not find path " " in schema
exception error mongoose, array-filters, strict-query, schema, update
Cast to Array failed for value
exception error mongoose, query, cast, logical-operators
Model.findByIdAndUpdate() no longer accepts a callback
exception error mongoose, callback, promise, migration, api-change, findandmodify
Query must have an associated model before executing
exception error mongoose, query, exec, model-binding
Can't use
exception error mongoose, subdocument, query, operators
Connection.prototype.destroy() no longer accepts a callback
exception error destroy, connection-lifecycle, callbacks, migration, mongoose-7
sort() takes at most 2 arguments
exception error mongoose, query, sort, invalid-argument, arity
Query.prototype.find() no longer accepts a callback
exception error mongoose, callback, promise, migration, breaking-change, find
Mongoose does not support using async iterators with an…
exception error aggregation, async-iterator, cursor, for-await, mongoose
Schema hasn't been registered for model
exception error model, missing-schema, model-lookup, multi-connection
Aggregate has empty pipeline
exception warning mongoose, deprecation, findoneandupdate, query-options, upgrade
$near must be either an array or an object with a $geometry…
exception error mongoose, geospatial, near, geojson, query
Can't use with Number.
exception error mongoose, number, query, operator, filter
No _id found on document!
exception error mongoose, delete, id, document
Document.prototype.populate() no longer accepts a callback
exception error mongoose, populate, callback-removed, async-await, migration
`connection.model()` should not be run with `new`. If you…
validation error model, constructor-misuse, api-misuse
Invalid schema configuration
exception error schema, type-resolution, configuration, circular-imports
Invalid $within $box argument. Expected an array, received
exception error mongoose, geospatial, within, box, query