vuex-module-decorators
vuex-module-decorators copied to clipboard
NuxtJs ERR_STORE_NOT_PROVIDED
Hello i have an interesting problem while using vuex-module-decarators with nuxtjs.
So when i try to use it gives me error that store is not provided, which it is already provded. Im using exact the same code as provided in docs. Here is all files including error
Exact same error here.
Well seems to be not developed anymore. Better to wait for vuejs 3..
Maybe @nuxtjs/auth
package conflict wiath vuex-module-decorators
package.
In my case, I used nuxt-i18n
. that package used vuex. and provide toggle use vuex option. so turn off option, It works.
@armadillo-dev is onto something
I'm using Vuex-ORM, which seems to be conflicting with vuex-module-decorators. What I ended up doing was swapping the order I was loading the plugins in /store/index.ts
...
from:
export const plugins = [initializer, VuexORM.install(database)];
to:
export const plugins = [VuexORM.install(database), initializer];
then it just works as expected
(as an additional suggestion for nuxt: ensure your store filename matches the module name!)
This seems to be a bug in the latest releases of this package, I use version ^0.10.1
and everything works perfect. In version ^0.16.1
the error is reproducible
I have the same problem with Nuxt in version ^0.16.1
. Have you found any solution?
The same error
I have now hit the issue again after installing the nuxtjs/auth module.
Solution for now: I downgraded vuex-module-decorator to ^0.10.1, as suggested by christian-bravo7
This resolves the conflict and everything seems to work as before..
I have same problem. If I remove this line, I got this error.
- nuxt.config.js
router: { middleware: [ 'auth', ], },
or
- XXX.vue
auth: false
I have the same problem with nuxt-i18n. Any updates on how to make them work together? (Disabling vuex in nuxt-i18n is a workaround)
Also ran into this issue today where @nuxtjs/auth
caused a conflict. As a temporary workaround I disabled Vuex for the auth module which can be done in nuxt.config.js
under auth: { vuex: false }
.
I have documented some approaches to find out the optimum approach in this ticket: https://github.com/sniperadmin/qms-nuxt-ts/issues/17
@armadillo-dev
Maybe
@nuxtjs/auth
package conflict wiathvuex-module-decorators
package. In my case, I usednuxt-i18n
. that package used vuex. and provide toggle use vuex option. so turn off option, It works.
Thank you so much. Setting vuex: false
in i18n plugin fixed my issue.