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

Issue with persisting a specific store. Improve docs? #383

Open
4 of 5 tasks
filipescaglia opened this issue Feb 13, 2025 · 0 comments
Open
4 of 5 tasks

Issue with persisting a specific store. Improve docs? #383

filipescaglia opened this issue Feb 13, 2025 · 0 comments
Labels
🔍️ pending triage This issue needs to be looked into

Comments

@filipescaglia
Copy link

filipescaglia commented Feb 13, 2025

Are you using Nuxt?

  • Check this box if you encountered the issue using Nuxt and the included module.

Describe the bug

I just spent almost an hour trying to figure out why a specific store in my application wasn't being persisted. After a lot of research, including checking the issues here, I found nothing—just one person mentioning something about the influence of JSON.stringify in another issue they were facing.

I decided to test whether the data I was trying to save was being successfully converted, and I ended up discovering that one of the objects was throwing a circular structure error, as shown in the following image.

Image

Was this a stupid mistake on my part? Probably. But I think it deserves a mention in the documentation, either in the limitations section or in the storage configuration part, since the Pinia plugin itself didn’t throw any errors, even when I forced persistence using store.$persist or make the code actually throw an error in these cases, i don't know

Reproduction

Try to store an object with circular reference. I was trying to store a laravel echo instance (not doing that anymore).

System Info

Vue 3, pinia and pinia-plugin-persistedstate

Used Package Manager

npm

Validations

@filipescaglia filipescaglia added the 🔍️ pending triage This issue needs to be looked into label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔍️ pending triage This issue needs to be looked into
Projects
None yet
Development

No branches or pull requests

1 participant