-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
router.push fails when app is ran over file:// not http:// #17212
Comments
prusnak
pushed a commit
to trezor/trezor-suite
that referenced
this issue
Oct 3, 2020
This change fixes the upstream issue vercel/next.js#17212 Let's remove the patch once the upstream fixes this in their release
This seems to be fixed: |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Describe the bug
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
out/index.html
) over file:// I do this via anelectron-next
app)router.push('/about')
Expected behavior
Should accept the URL even if it's not served over HTTP, but it's file://.
Screenshots
When run the static export, any

router.push
call results in this error now:System information
Additional context
Change of this line I believe is causing Next's router to fail when Next static output is ran in file:// context rather than served on an HTTP server:
https://github.com/vercel/next.js/blob/canary/packages/next/next-server/lib/router/utils/parse-relative-url.ts#L26
We use Next in Electron and it was working perfectly using the next's static export.
The text was updated successfully, but these errors were encountered: