Skip to content

useRouter() returns undefined when uses in setup() method in Options API component #2228

Discussion options

You must be logged in to vote

If you run npm list vue-router, I believe you'll see that you have two versions of vue-router installed.

Your project uses 4.3.2, but brdgm-commons is still pulling in 4.2.5. They both need to use the same Vue Router, otherwise the symbols used by provide/inject won't match.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by posva
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2226 on May 05, 2024 09:36.