vuejs / vuex

🗃️ Centralized State Management for Vue.js.
https://vuex.vuejs.org
MIT License
28.41k stars 9.57k forks source link

vue__WEBPACK_IMPORTED_MODULE_0__.reactive) is not a function #2079

Open jmastiholimath opened 2 years ago

jmastiholimath commented 2 years ago

Version

4.0.2

Steps to reproduce

Trying to upgrade vue 2 to vue 3 with vuex 4 version and getting below error

vuex.esm-bundler.js?16b2:140 Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_0__.reactive) is not a function

What is actually happening?

Trying to upgrade vue 2 to vue 3 with vuex 4 version using migration build.

peter-brennan commented 2 years ago

i'm getting this when i try to import vuex into a nativescript-vue application.

elliottshane commented 2 years ago

having the same issue after upgrade. any ideas how to fix?

elliottshane commented 2 years ago

found this: https://blog.csdn.net/qq_17211063/article/details/123782422 - Worked for me.

It is because of the version problem that you have installed the latest vuex 4 or above:

Solution: Install the 3 series:

First uninstall the installed version 4 of vuex

npm uninstall vuex

Install version 3.6.2

npm install --save vuex@3.6.2

WiseJade commented 10 months ago

I've been struggling with the same problem all day, and thanks to you, I solved it. thank you. I use nativescript-vue version 2.9.3 and solved same error install vuex version 3.6.2