[Vuejs]-Vuejs and vuex, cannot read property '$store'

5👍

You missed to export default your store :

export default new Vuex.Store({
   ...

and use Vue.use(Vuex) once in the store creation, because Vue.use(Vuex) expects you define a store instance after that which is not the case in the main.js and it neglect the already created store.

Leave a comment