79605369

Date: 2025-05-04 07:17:39
Score: 1.5
Natty:
Report link

Got the same error in conjunction NextJS + MongoDB + Typegoose. Locally it works fine but after deploying on Vercel (or netlify) got the wrong behavior. Depending on the scenario it cause the amount of newly appeared collections. To solve this I force to set collection names in @modelOptions. F.e.

@modelOptions({schemaOptions: { timestamps: true, collection: 'ships'}})
export class Ship {
...
}

Docs: https://typegoose.github.io/typegoose/docs/guides/advanced/models-with-same-name/

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @modelOptions
  • Low reputation (1):
Posted by: Дмитрий Иванов