title: vuex unknown action type when attempting to dispatch action from vuejs component
body: <p>I'm using laravel, vue and vuex in another project with almost identical code and it's working great. I'm trying to adapt what I've done there to this project, using that code as boilerplate but I keep getting the error:</p>
  
  <pre><code>[vuex] unknown action type: panels/GET_PANEL
  </code></pre>
  
  <p>I have an index.js in the store directory which then imports namespaced store modules, to keep things tidy:</p>
  
  <pre><code>import Vue from "vue";
  import Vuex from "vuex";
  var axios = require("axios");
  
  import users from "./users";
  import subscriptions from "./subscriptions";
  import blocks from "./blocks";
  import panels from "./panels";
  
  Vue.use(Vuex);
  export default new Vuex.Store({
  
    state: {
    },
    actions: {
  
    },
    mutations: {
  
    },
    modules: {
      users,
      subscriptions,
      blocks,
      panels
    }
  })
  </code></pre>
  
  <p>panels.js:</p>
  
  <pre><code> const state = {
      panel: []
    }
  
    const getters = {
    }
    const actions = {
      GET_PANEL : async ({ state, commit }, panel_id) =&gt; {
        let { data } = await axios.get('/api/panel/'+panel_id)
        commit('SET_PANEL', data)
      }
    }
  
    const mutations = {
      SET_PANEL (state, panel) {
        state.panel = panel
      }
    }
  
  export default {
    namespaced: true,
    state,
    getters,
    actions,
    mutations
  }
  </code></pre>
  
  <p>Below is the script section from my vue component:</p>
  
  <pre><code>&lt;script&gt;
  import { mapState, mapActions } from "vuex";
  export default {
    data () {
      return {
      }
    },
    mounted() {
      this.$store.dispatch('panels/GET_PANEL', 6)
    },
    computed: 
      mapState({
        panel: state =&gt; state.panels.panel
    }),
    methods: {
      ...mapActions([
        "panels/GET_PANEL"
      ])
    }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>And here is the relevant code from my app.js:</p>
  
  <pre><code>import Vue from 'vue';
  import Vuex from 'vuex'
  import store from './store';
  Vue.use(Vuex)
  
  const app = new Vue({
    store: store,
  }).$mount('#bsrwrap')
  </code></pre>
  
  <p>UPDATE:: I've tried to just log the initial state from vuex and I get: Error in mounted hook: "ReferenceError: panel is not defined. I tried creating another, very basic components using another module store, no luck there either. I checked my vuex version, 3.1.0, the latest. Seems to be something in the app.js or store, since the problem persists across multiple modules.</p>