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

Since v8.0.0 <ExternalScripts/> throw useLocation out of context error #455

Open
mikkpokk opened this issue Feb 17, 2025 · 0 comments
Open

Comments

@mikkpokk
Copy link

mikkpokk commented Feb 17, 2025

Describe the bug

Vite build throws fatal error: Error: useLocation() may be used only in the context of a <Router> component, whenever <ExternalScripts/> component is used on root.tsx.

Remix versions affected: 2.x - 2.15.3

Your Example Website or App

Steps to Reproduce the Bug or Issue

  1. Use remix-utils ^8.0.0.
  2. Follow documentation
  3. Use <ExternalScripts/> on your root.tsx file (inside Layout exportable component).

Expected behavior

Server should not throw fatal error. We should have ability to use <ExternalScripts/> component.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Any browser
  • Version: ^8.0.0 - ^8.1.0

Additional context

No response

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

1 participant