I am getting error cannot overwrite model once compiled mongoose, how to fix it?
Answer Posted / Yati Bajpai
This error usually occurs when you try to compile or save a modified Mongoose model after it has already been compiled. To fix this issue, ensure that before saving or compiling the modified Mongoose model, you delete any existing instances of the model in your MongoDB database and then recompile or save your updated model.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers