Skip to content Skip to sidebar Skip to footer

Mongoose "this.model Is Not A Function"

This is how I defined my Schema & Schema methods. const Schema = mongoose.Schema; const ItemSchema = new Schema({ type:String, brand:String, description:

Solution 1:

You defined 'model' as string when you create new Schema. Just delete model:String,

http://mongoosejs.com/docs/models.html


Post a Comment for "Mongoose "this.model Is Not A Function""