An error occurred in hook getInspectorState registered
Version
4.0.2
Reproduction link
Steps to reproduce
- vue create project-name with vuex
- run
- open with chrome
- update src/store/index.js add test module (namespaced: true)
- first time will be all right
- remove test module from store
- refresh chrome
tell me: backend.js:710 An error occurred in hook getInspectorState registered by plugin org.vuejs.vuex backend.js:711 Error: Missing module "test" for path "test/" - refresh chrome with clear cache also tell me that error
- console store this attribute _makeLocalGettersCache also with test/ .....
What is expected?
can clear _makeLocalGettersCache when new project run open in the web tab
What is actually happening?
An error occurred in hook getInspectorState registered by plugin org.vuejs.vuex Error: Missing module "test" for path "test/"
but I haved remove test module
it also tell me this message




I got this error too and I think I figured out why it happened.
I was using the vue devtools and was looking at the vuex state for the module in the devtools. Then I removed the vuex module and started getting this error.
It seems like the dev tools caches what module is selected and when that module is not available you get this error.
The workaround for me was to select another module in the vuex state inspector in vue devtools.
I am having same issue when I dynamically import a module to a component, docs.
Example: Admin.vue
import AdminModule from '@/store/modules/admin.js';
export default {
mounted() {
this.$store.registerModule('admin', AdminModule);
},
beforeDestroy() {
this.$store.unregisterModule('admin');
},
}
And what @nicklasisraelsson suggests, works for me as well as a fix. However this is a bit annoying because it outputs errors when you try to debug stuff from this async module and I have always to select another module before change page.