Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this.$store is undefined in components in migration build #3883

Closed
RyanClementsHax opened this issue Jun 3, 2021 · 4 comments
Closed

this.$store is undefined in components in migration build #3883

RyanClementsHax opened this issue Jun 3, 2021 · 4 comments

Comments

@RyanClementsHax
Copy link

RyanClementsHax commented Jun 3, 2021

Version

3.1.0-beta.7

Reproduction link

https://github.com/RyanClementsHax/vue-compat-vuex-bug

Steps to reproduce

Follow the steps outlined here to upgrade a vue 2.x app using vuex to vue 3, and use @vue/compat v3.1.0-beta.7

What is expected?

The store is accessible in components via this.$store after migration build is installed and compiler errors are dealt with in the console.

What is actually happening?

this.$store is undefined in components after the migration build is installed and compiler errors are dealt with.


I could be reading the @vue/compat instructions incorrectly, but it seems from them that this shouldn't be happening. Am I wrong? I very well could be.

@posva
Copy link
Member

posva commented Jun 4, 2021

You need to upgrade to Vuex 4 (point 8)


Remember to use the forum or the Discord chat to ask questions!

@posva posva closed this as completed Jun 4, 2021
@RyanClementsHax
Copy link
Author

Oops thanks!

@yyx990803
Copy link
Member

Vuex 3 should also work with the migration build in theory.

@yyx990803 yyx990803 reopened this Jun 5, 2021
@AliaksandrFitzner
Copy link

Hello Guys! Con you please confirm that compat build not working with vuex 3. Thx a lot!

@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants