title: "export 'default' (imported as 'Vue') was not found in 'vue' (Vuex, Store)
body: <p>I am new to Vue and I want to rebuild a existing CMS using Vue.
  As I was building the authentication system, this error appeared:</p>
  <pre><code> WARNING  Compiled with 1 warnings                                                                                                                                                                                                                           17:16:12
   warning  in ./src/store/index.js
  
  &quot;export 'default' (imported as 'Vue') was not found in 'vue'
  </code></pre>
  <p>The browser-console is telling me this:</p>
  <pre><code>Uncaught TypeError: Cannot read property 'use' of undefined
      at eval (index.js:10)
      at Module../src/store/index.js (app.js:1337)
      at __webpack_require__ (app.js:849)
      at fn (app.js:151)
      at eval (cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader-v16/dist/index.js?!./src/views/auth/Login.vue?vue&amp;type=script&amp;lang=js:2)
      at Module../node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader-v16/dist/index.js?!./src/views/auth/Login.vue?vue&amp;type=script&amp;lang=js (app.js:974)
      at __webpack_require__ (app.js:849)
      at fn (app.js:151)
      at eval (Login.vue?vue&amp;type=script&amp;lang=js:2)
      at Module../src/views/auth/Login.vue?vue&amp;type=script&amp;lang=js (app.js:1469)
  </code></pre>
  <p>My main.js file:</p>
  <pre><code>import App from './App.vue'
  import { createApp } from 'vue'
  import router from './router'
  
  createApp(App).use(router).mount('#app')
  </code></pre>
  <p>My store/index.js file:</p>
  <pre><code>import Vuex from 'vuex'
  import Vue from 'vue'
  import axios from 'axios'
  
  Vue.use(Vuex)
  axios.defaults.baseURL = 'https://[blablabla]/api'
  
  export const store = new Vuex.Store({
      state: {
          access_token: window.localStorage.getItem('access_token') || null,
          filter: 'all',
          todos: []
      },
      getters: {
          access_token: state =&gt; {
              return state.access_token;
          }
      },
      mutations: {
          retreiveToken(state, token) {
              state.access_token = token;
          }
      },
      actions: {
          authenticate(context, credentials) {
              axios.post('/user/authenticate.php', { username: credentials.username, password: credentials.password })
                  .then(response =&gt; {
                      // const token = response.data.access_token
                      // localStorage.setItem('access_token', token)
                      // context.commit('retrieveToken', token)
                      console.log(response)
                  })
                  .catch(error =&gt; {
                      console.log(error)
                  })
          }
      }
  })
  </code></pre>
  <p>My /views/auth/Login.vue script:</p>
  <pre><code>&lt;script&gt;
  import { store } from '@/store'
  
  export default {
      name: 'Login',
      data() {
          return{
              username: '',
              password: ''
          }
      },
      methods: {
          login(){
              store.dispatch('authenticate', {
                  username: this.username,
                  password: this.password
              })
          }
      }
  }
  &lt;/script&gt;
  </code></pre>
  <p>When i remove &quot;Vue.use(Vuex)&quot; the browser errors with:</p>
  <pre><code> [vuex] must call Vue.use(Vuex) before creating a store instance
  </code></pre>
  <p>Can someone tell me what is going on here?
  Thanks!</p>