Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

E11000 duplicate key & validate errors

default discord avatar
igormfelast year
2

Hi,



I am getting errors I was not getting just a few hours ago, and reverting my repo to a working stage is still giving me these errors. I am not sure what can be the issue.



This error, for example, I get when I attempt to create a user:



And I am also getting errors with validate issues for collection relationship fields, but there is no validation happening. I commented out all of them to test.



I reverted back to the initial version of the repo, 35 commits ago. I commented out all hooks, everything. The error still persists, I'm really not sure what is going on:

  • Do you have a field that has unique set?

  • default discord avatar
    igormfelast year

    I did not, and it went away after I deleted all collections on the mongoDB portal, as well as _config. I think for some reason I added unique and removed at some point in the past, but running yarn generate:types was not updating it

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.