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

Missing current instance. useRouter() must be called inside <script setup> or setup() #169

Closed
Luferov opened this issue Oct 10, 2022 · 14 comments
Labels
bug Something isn't working

Comments

@Luferov
Copy link

Luferov commented Oct 10, 2022

Version

@nuxtjs/color-mode: 3.1.8
Nuxi 3.0.0-rc.11
Nuxt 2.16.0-27720022.54e852f with Nitro 0.5.4

What is Expected?

When using nuht/bridge with nuxt-rc.11, an error appears.
image

image

@Luferov Luferov added the bug Something isn't working label Oct 10, 2022
@P4sca1
Copy link

P4sca1 commented Oct 12, 2022

nuxt/bridge#554

@Luferov
Copy link
Author

Luferov commented Oct 12, 2022

nuxt/bridge#554

🤔

@P4sca1
Copy link

P4sca1 commented Oct 12, 2022

Using useRouter() should work fine. This is an issue with Nuxt Bridge that got introduced in nuxt/bridge#533 (see the issue I linked).

@Luferov
Copy link
Author

Luferov commented Oct 12, 2022

Using useRouter() should work fine. This is an issue with Nuxt Bridge that got introduced in nuxt/bridge#533 (see the issue I linked).

Yep, but it doesn’t work. In nuxt/bridge#533 deleted useRoute, and this I added solution through nuxtApp.

@P4sca1
Copy link

P4sca1 commented Oct 12, 2022

We should probably fix the upstream issue instead of adding a workaround in all modules where useRouter is used.

@Luferov
Copy link
Author

Luferov commented Oct 13, 2022

I agree, however this fix allows the system to work now.

@Luferov
Copy link
Author

Luferov commented Oct 15, 2022

@P4sca1 when this problem will resolve global, what do you thins about this?

@P4sca1
Copy link

P4sca1 commented Oct 15, 2022

I don't know when the issue gets resolved. Maybe @danielroe can tell. But I think Nuxt 3 issues have priority before Nuxt Bridge issues at the moment.

@danielroe
Copy link
Collaborator

Yes, I think we should fix this in bridge.

@Luferov
Copy link
Author

Luferov commented Oct 15, 2022

It would be great! ❤️

@NtchPlayer
Copy link

Hi !
Any news about this issue ? I see RC 12 of Nuxt 3 is now available, I don't know the delay between a new RC of Nuxt 3 and a new release of Nuxt Bridge 🤔

@Luferov
Copy link
Author

Luferov commented Oct 23, 2022

@danielroe look like revert or no?

@Atinux
Copy link
Contributor

Atinux commented Dec 7, 2022

Can you confirm the bug is fixed with latest bridge?

@Luferov
Copy link
Author

Luferov commented Dec 7, 2022

Can you confirm the bug is fixed with latest bridge?

Works good!

@Luferov Luferov closed this as completed Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants