title: How to use mapGetter with vuex
body: <p>I am using mapGetters and mapActions in my navbar but for some reason the mapGetters is returning "TypeError: Cannot read property 'getters' of undefined" even though im using them both the same way. Could someone help me spot my error, I am new to vuex and how this works. </p>
  
  <p>Here are my files: 
  Auth.js</p>
  
  <pre><code>const state = {
      token: localStorage.getItem('token') || '',
      user: {},
      status: '',
      error: null
  };
  
  const getters = {
      isLoggedIn: state =&gt; !!state.token,
      authState: state =&gt; state.status,
      user: state =&gt; state.user,
      error: state =&gt; state.error
  };
  
  const actions = {
      // Login Action
      async login({
          commit
      }, user) {
          commit('auth_request');
          try {
              let res = await axios.post('/api/users/login', user)
              if (res.data.success) {
                  const token = res.data.token;
                  const user = res.data.user;
                  // Store the token into the localstorage
                  localStorage.setItem('token', token);
                  // Set the axios defaults
                  axios.defaults.headers.common['Authorization'] = token;
                  commit('auth_success', token, user);
              }
              return res;
          } catch (err) {
              commit('auth_error', err);
          }
      },
      // Register User
      async register({
          commit
      }, userData) {
          try {
              commit('register_request');
              let res = await axios.post('/api/users/register', userData);
              if (res.data.success !== undefined) {
                  commit('register_success');
              }
              return res;
          } catch (err) {
              commit('register_error', err)
          }
      },
      // Get the user Profile
      async getProfile({
          commit
      }) {
          commit('profile_request');
          let res = await axios.get('/api/users/profile')
          commit('user_profile', res.data.user)
          return res;
      },
      // Logout the user
      async logout({
          commit
      }) {
          await localStorage.removeItem('token');
          commit('logout');
          delete axios.defaults.headers.common['Authorization'];
          router.push('/login');
          return
      }
  };
  
  const mutations = {
      auth_request(state) {
          state.error = null
          state.status = 'loading'
      },
      auth_success(state, token, user) {
          state.token = token
          state.user = user
          state.status = 'success'
          state.error = null
      },
      auth_error(state, err) {
          state.error = err.response.data.msg
      },
      register_request(state) {
          state.error = null
          state.status = 'loading'
      },
      register_success(state) {
          state.error = null
          state.status = 'success'
      },
      register_error(state, err) {
          state.error = err.response.data.msg
      },
      logout(state) {
          state.error = null
          state.status = ''
          state.token = ''
          state.user = ''
      },
      profile_request(state) {
          state.status = 'loading'
      },
      user_profile(state, user) {
          state.user = user
      }
  };
  
  export default {
      state,
      actions,
      mutations,
      getters
  };
  </code></pre>
  
  <p>Store</p>
  
  <pre><code>import Vue from 'vue'
  import Vuex from 'vuex'
  
  import Auth from './Auth';
  
  Vue.use(Vuex)
  
  export default new Vuex.Store({
    modules: {
      Auth
    },
    state: {
  
    },
    mutations: {
  
    },
    actions: {
  
    }
  </code></pre>
  
  <p>Navbar</p>
  
  <pre><code>import { mapGetters, mapActions } from "vuex";
  export default {
    computed: {
      ...mapGetters(["isLoggedIn"])
    },
    methods: {
      ...mapActions(["logout"]),
      logoutUser() {
        this.logout();
      }
    }
  };
  </code></pre>