what could cause this error: ReferenceError: AggregateError is not defined in svelte-persistent-stores library
what could cause this error: ReferenceError: AggregateError is not defined in svelte-persistent-stores library. I get this error when running the an app on a mobile device. And the error comes from svelte-persistent-stores library
This error don't come from @macfja/svelte-persistent-store but from the serialization library @macfja/serializer
This library predefined a several standard class like AggregateError.
It's weird that you have the error, the class seem to be well-supported
Do you have some spec about the device ? Do the app run in a browser or in Node ?
If you don't need the class serialization, you can switch to another serializer (Procedure explained here: https://github.com/MacFJA/svelte-persistent-store/blob/main/.docs/How-To/06-Change-Serialization.md).
Be careful, simpler serialization also mean less flexible and more care to add to the data.
For example, JSON.stringify don't handle circular reference
Thanks for your reply. Perhaps the error is related to the device. I ran the app on an Android phone, precisely an Infinix hot 10. I'll try the workaround you proposed.