1

I'm trying to migrate form props to Vuex 4. But when I import Vuex I get Vue is not defined.

https://stackblitz.com/edit/vue-t8q9t9

andyleigh
  • 21
  • 5
  • Did you install vuejs? and added? import Vue from 'vue' – gguney Mar 11 '22 at 11:07
  • @gguney const { createApp } = require('vue'); import App from './App.vue'; import BootstrapVue3 from 'bootstrap-vue-3'; import { store } from './store.js'; import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap-vue-3/dist/bootstrap-vue-3.css'; createApp({App}).use(BootstrapVue3).use(store).mount('#app'); – andyleigh Mar 11 '22 at 11:08

1 Answers1

-2

In your entry point, that you import Vuex. Add this:

import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex)

Remember install dependences