Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what could cause this error: ReferenceError: AggregateError is not defined in svelte-persistent-stores library #46

Open
shellking4 opened this issue Jun 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@shellking4
Copy link

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

@MacFJA
Copy link
Owner

MacFJA commented Jun 4, 2023

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

@MacFJA MacFJA added the bug Something isn't working label Jun 4, 2023
@shellking4
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants