Yes you just have to do the following: export const ModelName = mongoose.models?.ModelName || mongoose.model('ModelName', modelSchema) in this way the model will not be overwrited