typed-vuex icon indicating copy to clipboard operation
typed-vuex copied to clipboard

fix: devtools does not show auth module

Open MrJmpl3 opened this issue 4 years ago â€ĸ 6 comments

🐛 The bug Nuxt Auth cannot register a module in store, look the devtools

🛠ī¸ To reproduce https://codesandbox.io/s/distracted-platform-hw4xe

🌈 Expected behaviour Nuxt Auth can register a module for authentification.

ℹī¸ Additional context Nothing

MrJmpl3 avatar May 23 '20 05:05 MrJmpl3

@MrJmpl3 I think this may be related to #39. The auth module is being correctly registered, it's just not showing up in the devtools. If you click on a component in the devtools Component mode (first tab), and then switch to console, you can verify this:

console.dir($vm0.$store.state.auth)
// loggedIn: false
​// strategy: "local"
​// user: null

Unfortunately, I believe this to be a bug in the devtools as nuxt-typed-vuex doesn't change, modify or interfere with the Vue store at all (or in other libraries' access to the store) - it only provides an accessor to it.

danielroe avatar May 23 '20 07:05 danielroe

Edit 12/17/2020: The method described below is no longer working for me and the bug has returned.


Left the same comment in the other issue but this is how I managed to fix it:

I was having a similar issue with the store state not getting updated in vue dev tools. I managed to fix this by doing the following:

  1. In the Vue Dev Tools tab, click on the Settings icon.
  2. Check the box to enable New Vuex Backend.
  3. After restarting the browser, vuex state should now work as designed.

ShaggyTech avatar May 29 '20 02:05 ShaggyTech

I do @ShaggyTech fix in the example, but auth module registration and store of auth module don't show đŸ˜ĸ

MrJmpl3 avatar Jun 06 '20 11:06 MrJmpl3

@MrJmpl3 i had enabled New Vuex Backend already, but it's not updating for me either.

@danielroe does it work for you?

avxkim avatar Jun 27 '20 12:06 avxkim

Also there's similar behavior, when you rehydrate state from a localstorage with this package: https://github.com/robinvdvleuten/vuex-persistedstate

In a console i see, it's rehydrated, but not in devtools. @danielroe is it on the devtools side problem? Can we report it?

avxkim avatar Jul 20 '20 12:07 avxkim

@webcoderkz Yes, I believe this is a bug with devtools.

danielroe avatar Jul 20 '20 12:07 danielroe