I just can't get it to work properly. Every HMR (hot reload) on a component that imports the payload client (the
from next-payload install
) crashes the app with the following error:
Unhandled Runtime Error
_preferencesmodel once compiled.
This seems to have something to do with mongoose used internally by payload
Hey @teamkube welcome in - this issue has been mentioned previously here:https://discord.com/channels/967097582721572934/1112747743472005215/1112748016592486420
Though, I don't seen a resolution posted...
Seems like a version error? And yes, related to the preference collection
The version chart posted by @zeniodev lists 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 applicationhttps://github.com/payloadcms/next-payload-demo
13.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