You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Please mention your node.js, mongoose and MongoDB version.
[BUG]
Version: ^5.2.16
MongoDB: not yet connected
Current behavior: some of the functions is missing, for example mongoose.model
Expected: model<T extends Document>(name: string, schema?: Schema, collection?: string, skipInit?: boolean): Model<T>;
the types definition is working, but when compiled / used, it crash in runtime since model function is missing
import * as mongoose is not supported. The only ES6 import syntax we currently support is import mongoose from 'mongoose'; and in general there really isn't a way for us to support import * as mongoose with the way our code is currently structured. Sorry for the trouble.
@deckyfx what transpiler are you using? I haven't seen the 'no default export' error you mentioned even though we support building with webpack. If you're using typescript, you might try the suggestion from this comment
Do you want to request a feature or report a bug?
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Please mention your node.js, mongoose and MongoDB version.
[BUG]
Version: ^5.2.16
MongoDB: not yet connected
Current behavior: some of the functions is missing, for example
mongoose.model
Expected:
model<T extends Document>(name: string, schema?: Schema, collection?: string, skipInit?: boolean): Model<T>;
the types definition is working, but when compiled / used, it crash in runtime since model function is missing
here is the contents of
import * as mongoose
The text was updated successfully, but these errors were encountered: