Vue Error: Uncaught TypeError: Super expression must either be null or a function

Viewed 83

I have encountered error in my vue app when I try to access vuex store in my translation setup file.

Uncaught TypeError: Super expression must either be null or a function

My export looks like this:

src/store/index.ts

const store = new Vuex.Store({
  modules: {
    global: new GlobalModule<any>(),
  },
})

export default store

My usage of it looks like this: src/lang/setup.ts

import store from '@/store/index'

let defaultLocale = store.getters['global/profile'].lang

I need to access the store to get preferred language but I can't access it from this file.

0 Answers
Related