title: Error: [vuex] expects string as the type, but found undefined
body: <p>Studying Vuex. I wrote a simple login page against the <a href="https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart" rel="noreferrer">example project</a> and the <a href="https://vuex.vuejs.org/zh/guide/modules.html" rel="noreferrer">document</a>, but when I tried to use a action function, the developer tool just warned me </p>
  
  <p><a href="https://i.stack.imgur.com/x7Pw0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/x7Pw0.png" alt="error info"></a></p>
  
  <p>Here is my code:</p>
  
  <p>src/views/Login.vue</p>
  
  <pre><code>handleLogin (formName) {
        this.$refs[formName].validate(valid =&gt; {
          if (valid) {
            // to do
            this.$store.dispatch('user/login', this.loginUser)
          } else {
            ......
            })
          }
        })
  </code></pre>
  
  <p>src/store/index.js</p>
  
  <pre><code>import Vue from 'vue'
  import Vuex from 'vuex'
  import user from './modules/User/user'
  // import info from './modules/info'
  
  Vue.use(Vuex)
  
  export default new Vuex.Store({
    strict: false,
    modules: {
      user,
      // info
    }
  })
  </code></pre>
  
  <p>/src/store/modules/User/actions.js</p>
  
  <pre><code>export const userActions = {
    login({commit}, loginUser) {
      commit(LOGIN)
      axios.post(`${ API_BASE_USER }/login`, loginUser)
           .then(res =&gt; {
             console.log(res)
             if (res.status == 200) { commit(LOGIN_SUCCESS, res.data) }
             else { commit(LOGIN_FAILURE, res.data) }
           })
    }
  }
  </code></pre>
  
  <p>/src/store/modules/User/user.js</p>
  
  <pre><code>import { userActions } from './actions'
  import { userMutations } from './mutations'
  export default {
    namespaced: true,
    state: {
      token: ''
    },
    actions: Object.assign({}, userActions),
    mutations: Object.assign({}, userMutations)
  }
  </code></pre>