MARKLESS_SERIALIZE_UNSUPPORTED_VALUE
State holds a value that Markless cannot send from the server to the browser.
Error from the runtime, while a page renders or runs.
What happened
Markless sends state from the server to the browser as data. This value is a function or a live object, so it cannot travel that way.
Markless prints the message, the reason, and a suggestion:
MARKLESS_SERIALIZE_UNSUPPORTED_VALUE: Cannot serialize value at <cellPrefix> because unknown values are not durable graph state.
Serialization is for durable graph state. Functions and host/runtime resources cannot be restored during resume.
Move runtime resources into attach={...}, make the value serializable state, or derive it with computed().
https://markless.dev/errors/MARKLESS_SERIALIZE_UNSUPPORTED_VALUE
Words in angle brackets change from case to case.
How to fix it
Keep plain data in state. Create live objects, like sockets, in an attach={...} behavior on an element. If the value comes from other state, use computed().
Where it comes from
@markless/serializer raises this code. Source:
- packages/serializer/src/protocol-state.ts
- packages/serializer/src/value.ts
- packages/web/src/fns/state-slot.ts
Read how to read a Markless error, or go back to all error codes.
