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

Different versions of vue routers in L9-start and L9-end package.json files #2

Closed
platput opened this issue Nov 5, 2021 · 3 comments

Comments

@platput
Copy link

platput commented Nov 5, 2021

So I was trying to follow along the coding, I was not able to move forward after removing the watchEffect and replacing it with beforeRouteEnter. The issue I suppose was with the vue-router version installed. I compared the L9-start and L9-end package json and found the vue-router version were actually different. So I changed my vue-router version with the one from L9-end and it worked.

@Bruce9000
Copy link

This lesson seems a bit out of date now sadly - it’s still borked in December.

If you follow the lesson you get an invalid route guard that stops it from working.

Like this helpful post suggests, if you upgrade vue-router (and I also had to upgrade vue to 3.2.26 for it to let me upgrade vue-router) then the code no longer errors - but it doesn’t work anymore. Changing pages using next or previous doesn’t execute the beforeRouteUpdate, so the event list doesn’t update anymore.

@ghostal
Copy link

ghostal commented Dec 20, 2021

Hi @Bruce9000, I'm still learning Vue here too, so I may be misunderstanding what you're saying, but I think you're describing a problem that's actually addressed later in the lesson, by using beforeRouteUpdate. Scroll down the lesson page to "🛑 Problem: Pagination stopped working" and you'll probably find that's what you need.

Aside from that, updating the dependencies seems to do the trick for the key issue - well done and thanks, @platoputhur, for figuring this out.

I've opened a PR (linked above for anyone who might find it helpful) with an updated package-lock.json so hopefully the tutorial repo can be updated soon.

@l1keafox
Copy link

l1keafox commented Feb 6, 2023

I even had problems with L8 and the provider/inject the Gstore.flashMessage until I updated vue/vue router to latest version.

@platput platput closed this as completed Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants