Closed UDK closed 2 years ago
It's strange, because I'm using VueX 4.0.0 with vuex-module-decorator. Here is my package.json:
"dependencies": {
"@inboxed/common": "^1.0.0",
"axios": "^0.21.1",
"babel-plugin-transform-decorators": "^6.24.1",
"core-js": "^3.6.5",
"primeicons": "^4.1.0",
"primevue": "^3.3.5",
"socket.io-client": "^3.1.0",
"vue": "^3.0.0",
"vue-i18n": "^9.0.0-rc.6",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0",
"vuex-module-decorators": "^1.0.1"
},
I will try to investigate it. Can you provide more informations about your project? Is it fresh project created with vue-cli?
Hi @gLenczuk My dependencies package.json
"dependencies": { "axios": "^0.21.1", "core-js": "^3.6.5", "primeflex": "^2.0.0", "primeicons": "^4.1.0", "primevue": "^3.3.5", "vue": "^3.0.0", "vue-class-component": "^8.0.0-0", "vue-router": "^4.0.0-0", "vue-toastification": "^2.0.0-rc.1", "vuex": "^4.0.0-0", "vuex-module-decorators": "^1.0.1" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.22.0", "@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-router": "~4.5.0", "@vue/cli-plugin-typescript": "~4.5.0", "@vue/cli-plugin-vuex": "~4.5.0", "@vue/cli-service": "~4.5.0", "@vue/compiler-sfc": "^3.0.0", "@vue/eslint-config-standard": "^5.1.2", "@vue/eslint-config-typescript": "^7.0.0", "babel-eslint": "^10.1.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.15.0", "eslint-plugin-import": "^2.20.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier-vue": "^3.0.0-alpha.2", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.0", "eslint-plugin-vue": "^7.8.0", "prettier": "^2.2.1", "sass": "^1.26.5", "sass-loader": "^8.0.2", "typescript": "~3.9.3" },
The project is new and created using the vue-cli
The package.json in version 1.0.1 does instead specify vuex as a devdependency at ^3.1.1, so that does not include version 4. I have the same problem as original poster. By the same token, it also does not support Vue 3.
@championswimmer Any plans to update this library for Vuex 4?
@gLenczuk did you find anything? I have a project that is currently working fine with this configuration, where as a new one today seemed to fail. Are there any work arounds?
AFAIK this warning comes from the peerdependency here
It claims it only works with vuex3
.
Has this been tested with vuex4
? Any caveats I should worry about?
What is the state about this issue right now?
Hope to support Vue 3, Vuex 4
4 Month passed now. Still having this issue. Is there any workaround?
I have used vuex-module-decorators for several months. And it's still bound to the concept of Vuex although it provides support of typescript and some advantages. But now I am going to use pinia, a composition-api style library for Vue2 & 3 state management. Since this repo has not been updated for nearly a year, for anyone who is worried about using this library, I recommend you give pinia a try in the new project.
no update 😪
Thanks everyone for pinning hopes on this. I have released v2.0 of this library that officially supports vue 3 + vuex 4.
Please install vuex-module-decorators@2 if you want to use that.
@d2phap I found a solution that worked for me:
npm i vuex-module-decorators --legacy-peer-deps
Please try and tell me :)
Thanks @guillaumeduhan I already decided not to use a decorator. Maybe I will come back and set up in my next project.
Funcionou aqui: npm i vuex-module-decorators --legacy-peer-deps
Hi) Can you please tell me, I have such a mistake:
I understand correctly that this is due to the fact that vuex-module-decorators does not support vuex 4. If so, tell me whether it will support it or it is not yet in the plans?