Vuex: [vuex] unknown mutation type: SET_USER / [vuex] unknown action type: fetchUser
commit/dispatch was called with a name that isn't registered in the store (or its module namespace).
[vuex] unknown mutation type: SET_USER[vuex] unknown action type: fetchUser[vuex] unknown getter: x[vuex] module namespace not found in mapState(): user/unknown mutation type Meaning
Check the exact name, module namespacing (user/SET_USER when namespaced: true), that the module is registered, and typos. In components mapMutations("user", [...]) helps. Vuex 3/4 is legacy; Pinia is the recommended store.
Common causes
- Typo in mutation/action name
- Namespaced module needs
module/name - Module not registered
- Calling mutation via dispatch (or reverse)
- Hot-reload dropping modules
⚡ Quick fix
- Use
store.commit("user/SET_USER", payload)for namespaced modules - Register modules in
new Vuex.Store({ modules: { user } }) - Verify names with Vue devtools
Detailed fix by platform
Vue
this.$store.commit("user/SET_USER", user)
How to diagnose
- Name — Exact?
- Namespace — Prefixed?
- Module — Registered?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Avoid mutating a prop directly Vue: [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders
- Error: [vuex] do not mutate vuex store state outside mutation handlers Vuex (strict mode): Error: [vuex] do not mutate vuex store state outside mutation handlers.
- Failed to resolve component Vue: [Vue warn]: Failed to resolve component: x
Most viewed in Vue
- Property was accessed during render but is not defined Vue: [Vue warn]: Property "x" was accessed during render but is not defined on instance
- Nuxt: window/document/localStorage is not defined (SSR) Nuxt: ReferenceError: window is not defined / 500 Internal Server Error during SSR
- injection "Symbol(router)" not found / useRouter() called without router Vue Router: [Vue warn]: injection "Symbol(router)" not found. / Cannot read properties of undefined (reading 'push')
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026