Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Vuex store detected in Vue Dev Tools (vue2/vuex3)

For very specific reasons, I have set the vue dev tools to true in production.

Vue.config.devtools = true

Am using the following versions:

"vue": "^2.5.2"
"vuex": "^3.0.1"
"vuetify": "^1.0.0"

While I can see the components and events, the Vuex store is not detected.

I have tried downgrading the vuex version to 2.3.1 and 2.4.x, but it did not help. Here's the link I referred to - https://github.com/vuejs/vue-devtools/issues/405

Note - The store works well, its just that I am not able to view it in the Vue dev tools.

Any pointers is appreciated.

like image 645
nizantz Avatar asked Jun 21 '18 17:06

nizantz


3 Answers

you have to set Vue.config.devtools = true before you create the store.

here my store.js:

import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
Vue.config.devtools = true

export const store = new Vuex.Store({
  state: {
    counter: 0
  }
})
like image 133
Us3rAIpha8rav0 Avatar answered Oct 01 '22 22:10

Us3rAIpha8rav0


Also make sure to turn on recording mode in devtools (the red round button).

It was turned off and that actually was the mistake. :-D

like image 21
Valentin Seehausen Avatar answered Oct 01 '22 22:10

Valentin Seehausen


I had the exact same problem with Vue 3. Updating the vuex from 4.0.0 to 4.0.2 did resolve the problem.

like image 29
anchan42 Avatar answered Oct 01 '22 22:10

anchan42