-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: this.$__setSchema is not a function #14281
Comments
The |
Hmm, I talked to our developer and he said the only thing he changed was that he was using The issue that caused it is thus resolved, so perhaps it is not worth the time to investigate further, if the method is still there. |
fix(model): throw readable error when calling `Model()` with a string instead of `model()`
@adamreisnz this is more of an error message issue than a bug, calling |
Cheers thanks for that |
Prerequisites
Mongoose version
8.0.2
Node.js version
21.6
MongoDB server version
7.0
Typescript version (if applicable)
n/a
Description
Our error reporting tool captured the following error, which originated from Mongoose and seems to be an internal Mongoose error where the
__setSchema
function appears to be missing:Steps to Reproduce
Don't have exact schema's or an isolated reproducible case at this stage, but if the method has truly been removed or renamed it should be easy to track down.
Expected Behavior
No error to be thrown
The text was updated successfully, but these errors were encountered: