Circular dependency? Cannot access 'useUserStore' before initialization + HMR console errors #1941
Unanswered
cedric25
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Currently switching from
vuex
topinia
in a medium-size Vue 3 codebase.We have encountered some issue when migrating the user store, problems seem to be:
Here is a minimalist repository showing that app crashes at startup 👉 https://github.com/cedric25/try-pinia-repro
Error:
I've tried a few things: OptionAPI / CompositionAPI, Setup Stores / Option Store, mapState / storeToRefs...
Stop using
mapState
seems to fix the app crash, but HMR problems remain. (More info in the repo README)There is probably nothing to fix in pinia, I'm just looking for advice :)
Beta Was this translation helpful? Give feedback.
All reactions