New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't dispatch an action in a vuex module from another vuex module #158
Comments
Can you provide more context? |
Same for me, when I'm in a module I'm not able to call an action from an action in another module.
The authentication module looks like:
The error is the same as @tkaizer98 mentioned. |
The workaround is removing the
I use |
|
@duckytutu Oh. I didn't get any such errors. Take a look at this Repo. I created this project just last week for an article.
I use |
Hey @preetishhs , thanks for sharing your demo - I think it might be set to private, I'm getting a 404 error. |
@MitchellFry Sorry, I had moved it to Github. Please check this https://github.com/preetishhs/Vue-typescript-example |
I can also confirm this bug (actually I came here by googling the error message). I have two modules with a name attribute in @module, and I can not call actions, same stacktrace (but mutations work fine). Removing the name attribute fixed this. |
By removing the property name from module decorator also "solved" to me |
Remove the |
I'm also using |
please see notice
even so, you can't use it directly. we need to load it before we use it.
now,we should do it in one of two ways:
2,
|
I am using two namespaced modules. In one module I have an action in which I am trying to commit a mutation from the other module. I am getting this error:
here is the outline of my code:
socketStore.ts
I call this action in Home.vue with
It seems to work when I call the same function (createSocket) as a mutation. I cannot do this however because I need to call other mutations inside of it.
The text was updated successfully, but these errors were encountered: