mongoose TypeError: Schema is not a constructor
问题 I've encountered a strange thing. I have several mongoose models - and in one of them (only in one!) I get this error: TypeError: Schema is not a constructor I find it very strange as I have several working schemas. I tried logging mongoose.Schema in the non-working schema and it is indeed different from the mongoose.Schema in my working schemas - how is that possible? The code is almost identical. Here's the code for the non-working schema: var mongoose = require('mongoose'); var Schema =