[Vuejs]-I can't install vuex by npm

4👍

It looks like you are using Vue 2 and you are trying to install VueX 4 but they are not compatible together.

VueX 4 is for Vue 3
VueX 3 is for Vue 2

You need to specify that you don’t want the latest version but the V3 when using npm install: npm install vuex@3

Leave a comment