Level 10
I solved the problem . It was the npm version , I changed to NPM 16 version .
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hello , I have been working with quasar for 3 year . but now I created a new project , I chose to work with VUEX . I am trying to get a data from a VUEX file , but it is not getting this data any more . I dont know if something has changed in VUEX . or if they want us to work with PINIA , that is a similar storage manager . my code is like this -
Component -
<template>
<div>
size areaaaaaa -> {{ sizeArea }}
</div>
</template>
<script>
import { mapGetters, mapMutations } from 'vuex'
export default {
name: 'IndexPage',
computed: {
...mapGetters('home', {
sizeArea: 'sizeArea'
}),
}
}
</script>
STORE INDEX -
import { store } from 'quasar/wrappers'
import { createStore } from 'vuex'
import home from './modules/home'
// import example from './module-example'
/*
* If not building with SSR mode, you can
* directly export the Store instantiation;
*
* The function below can be async too; either use
* async/await or return a Promise which resolves
* with the Store instance.
*/
export default store(function (/* { ssrContext } */) {
const Store = createStore({
modules: {
home
},
// enable strict mode (adds overhead!)
// for dev mode and --debug builds only
strict: process.env.DEBUGGING
})
return Store
})
HOME MODULE -
export default {
namespaced: true,
state: () => ({
// SIZE AREA
sizeArea: 'dataaaaaaaa'
}),
mutations: {
},
actions: {
},
getters: {
sizeArea: state => {
return state.sizeArea
}
}
}
it does not shoes an error in console . but shoes error at the browser .
vue-router.esm-bundler.js?34ea:3325 TypeError: Cannot read properties of undefined (reading '_modulesNamespaceMap')
at getModuleByNamespace (vuex.esm-bundler.js?afb0:1349:1)
at Proxy.mappedGetter (vuex.esm-bundler.js?afb0:1236:1)
at ReactiveEffect.run (reactivity.esm-bundler.js?a27c:185:1)
at get value [as value] (reactivity.esm-bundler.js?a27c:1144:1)
at Object.get [as sizeArea] (runtime-core.esm-bundler.js?f781:3427:1)
at Object.get (runtime-core.esm-bundler.js?f781:3100:1)
at Proxy.render (IndexPage.vue?c8e0:2:1)
at renderComponentRoot (runtime-core.esm-bundler.js?f781:896:1)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js?f781:5580:1)
I solved the problem . It was the npm version , I changed to NPM 16 version .
Please or to participate in this conversation.