devtools
devtools copied to clipboard
Error: Missing module "myNamespace" for path "myNamespace/" at getStoreModule
Version
6.0.0-beta.21
Browser and OS info
Google Chrome Version 97.0.4692.71
What is actually happening
Hi, I have many store modules in my project with dynamic keys I generated in component before registration
data() {
return {
namespace: generateUniqNamespace(),
}
},
created() {
this.$store.registerModule(this.namespace, storeModule);
},
beforeUnmount() {
this.$store.unregisterModule(this.namespace);
}
and sometimes when I go to another page im my app, I catch this error in my console
Error: Missing module "myNamespace" for path "myNamespace/".
at main.js?61e932ae6e09e:118733:15
at Array.reduce (<anonymous>)
at getStoreModule (main.js?61e932ae6e09e:118729:16)
at main.js?61e932ae6e09e:118519:13
at handler (backend.js:687:16)
at DevtoolsHookable.callHandlers (backend.js:708:17)
at DevtoolsApi.callHook (backend.js:203:26)
at async DevtoolsApi.getInspectorState (backend.js:417:21)
at async sendInspectorState (backend.js:2383:44)
and then I watch this error everytime even I reload my tab or close it and open again
I have the same problem
Please provide a runnable reproduction of your issue so we can investigate.
http://joxi.ru/E2pjGxXU4KkP4r error in console http://joxi.ru/D2PxMoGcB7bVl2
Version 6.0.2
I've found way to reproduce:
- first of all you need turn on Hot module replacement on bundle configuration (mine is webpack 5.68.0)
- then choose vuex section
- then make some changes in component where you register store module with dynamic key and wait rebuilding's done
- leave page or make something to unregister store module
- that's it, this error will never be hidden, only reinstalling helps me
I fixed issue by removing vue dev tools, making sure I was in developer mode in google chrome extensions and added vue dev tools again.
Same here, I had to uninstall the chrome extension then re-install
I managed to reproduce the issue in here. The steps to follow are in the readme of the repo.
The issue seems to occur when changing the name of a namespaced module while analysing the store with the dev tools. I'm working in a project where we have a plugin that generates unique namespaces for modules, resulting in this issue being very apparent. I mocked a similar behavior in the repro project.
Let me know if I can be of more help.
Same here, just uninstalled / reinstalled and working fine
for me what worked is, in chrome VUE-inspector - de-select the selected module in vuex section or just move to components section.
I had the same problem on Firefox 113.0. Removing & adding the extension again, fixed the issue.
Same problem.
I've created module in my code. Some time later I've removed this module.
So, in my case dev tools is speaking about unexisting module.
VueDevTools v.6.5.0
Figure out why this error occurs.
-
When inspecting a dynamically register module, the path of the module will be recorded in the localStorage, which is for autofocusing on that module if you do something like refreshing the page.
-
After refreshing the page, the backend will try to autofocus the module depending on the record in localStorage, but if the module is missing, an error will be thrown. https://github.com/vuejs/devtools/blob/main/packages/app-backend-vue2/src/plugin.ts#L500-L502
-
As long as the data in localStorage is not updated, the error will be always thrown when the page is refreshed.
Somehow I think throwing the error is not necessary, failing on fetching module is normal behavior. (As some of the modules are registered dynamically)
Thanks for picking this up @Azurewarth0920 !