I just can't get it to work properly. Every HMR (hot reload) on a component that imports the payload client (the
getPayloadClient
you get
from next-payload install
) crashes the app with the following error:
Unhandled Runtime Error
_preferences
model once compiled.This seems to have something to do with mongoose used internally by payload
Hey
@1115279317245624393welcome in - this issue has been mentioned previously here:
https://discord.com/channels/967097582721572934/1112747743472005215/1112748016592486420Though, I don't seen a resolution posted...
Seems like a version error? And yes, related to the preference collection
The version chart posted by
@217614642006982656lists where this issue occurs,
13.4.0 ✅ works
13.4.1 ✅ works
13.4.2 ✅ works
13.4.3 ✅ works
13.4.4 ⚠️ Cannot overwrite _preferences model once compiled.
Does someone from the Payload team have any additional information regarding this issue?
I tried the version used by the demo application
https://github.com/payloadcms/next-payload-demo13.2.4-canary.6 that is a lot older than 13.4.3
maybe something got cached, ill try again with 13.4.3
I will look into this today
setting Next to 13.4.3 + deleting ./next , ./node_modules and my package.lock solved it
thanks a lot
did this ever get resolved (other than reverting to 13.4.3)? I just switched to mongo from postgres because of the number of issues but I'm hitting this now (next 13.5.6)
Star
Discord
online
Get dedicated engineering support directly from the Payload team.