meetups: [{ type: Schema.Types.ObjectId, ref: 'Meetup', }],
better try with:
meetups: { type: Schema.ObjectId, ref: 'Meetup' }
and declare : const Schema = mongoose.Schema; (it will be the Schema inside the type: -Schema -)
before: const GroupSchema = new Schema {
module.exports = mongoose.model('Group', groupSchema);
and then the meetup function in another file.
Hope it helps :)