When I run: yarn create nuxt-app I see in package.json:
"dependencies": {
"nuxt": "^2.15.8",
"vue": "^2.7.10",
},
I need to use Vuex.
For this environment I have to use Vuex 3.
So I did what the documentation said: yarn add vuex. But this always results in installing vuex 4:
"dependencies": {
"nuxt": "^2.15.8",
"vue": "^2.7.10",
"vuex": "^4.1.0"
},
But this will cause various problems, because vuex 4 only works with Vue 3.
The result of running yarn add vuex is the same as running yarn add vuex@next --save.
How do I install Vuex 3 for Vue 2.7 in my Nuxt project? What did I miss?
yarn add package-nameInstalls the "latest" version of the package.yarn add package-name@1.2.3Installed a specific version of a package from the registry.Try
yarn add vuex@3