vuex-module-decorators
vuex-module-decorators copied to clipboard
ERR_STORE_NOT_PROVIDED when used with @nuxtjs/auth
Hi,
I followed instructions for Nuxt here. When I use an action from store I'm getting ERR_STORE_NOT_PROVIDED. I created a minimal Code Sandbox for the error.
To see follow steps below:
- Open sandbox: https://codesandbox.io/s/intelligent-tree-k1l8o
- Open console
- Click button
If I remove @nuxtjs/auth from nuxt.config.js, it works as expected.
oh god same here, any solutions?
anyone ? got solution for this
Hi,
I followed instructions for Nuxt here. When I use an action from store I'm getting
ERR_STORE_NOT_PROVIDED. I created a minimal Code Sandbox for the error.To see follow steps below:
* Open sandbox: [codesandbox.io/s/intelligent-tree-k1l8o](https://codesandbox.io/s/intelligent-tree-k1l8o) * Open console * Click buttonIf I remove
@nuxtjs/authfrom nuxt.config.js, it works as expected.
I think this should fix your problem
https://codesandbox.io/s/competent-jang-l1f3c
@championswimmer thanks for the response.
- What did you change?
- I see button now, but after I click the button, I'm geting error again:

I think this should fix your problem
https://codesandbox.io/s/competent-jang-l1f3c
This doesn't load for me, I just recieve the following error.
NuxtServerError
Store not provided in decorator options when using dynamic option
Hi, I followed instructions for Nuxt here. When I use an action from store I'm getting
ERR_STORE_NOT_PROVIDED. I created a minimal Code Sandbox for the error. To see follow steps below:* Open sandbox: [codesandbox.io/s/intelligent-tree-k1l8o](https://codesandbox.io/s/intelligent-tree-k1l8o) * Open console * Click buttonIf I remove
@nuxtjs/authfrom nuxt.config.js, it works as expected.I think this should fix your problem
https://codesandbox.io/s/competent-jang-l1f3c
In documention you mentioned, to use dynamic modules you need to provide store instance. Which we can't provide store with nuxt.js
#244 Seems to be same error.
Also having this issue. Would be worth documenting.
same issue. Has anyone been able to solve it?
Same issue. Has anyone been able to solve it?
In case this helps anyone, took me a while to figure out and ended up with a working configuration.
Using "@nuxtjs/auth": "^4.9.1", "nuxt": "2.12.2", and "vuex-module-decorators": "^0.16.1" I got this working with the Nuxt typescript example (store-accessor and initializer). Only difference is that I had to use a @MutationAction. I was using a @Action which committed a mutation and that gave me above error (the error had nothing to do with the actual problem, as it seems).
The same issue
Solved with the help of https://qiita.com/yoshinbo/items/70f109db7c3de4b4a99f
But seems like 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
Solved with the help of https://qiita.com/yoshinbo/items/70f109db7c3de4b4a99f
But seems like workaround
I confirm it's a workaround for the moment, but it uses the NuxtJS classic mode of instantiating Vuex.
Thus it throws a deprecation warning at runtime.
Any news ? Only MutationAction is working with NuxtJS using stateFactory