Skip to content

404 error when navigating with <Link> and v3_lazyRouteDiscovery on Vercel when using different runtimes per route #10492

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

Closed
styxlab opened this issue Feb 24, 2025 · 6 comments

Comments

@styxlab
Copy link

styxlab commented Feb 24, 2025

Reproduction

  1. Deploy the following git repo to Vercel:
    https://github.com/styxlab/lazy-route-discovery-link-404-on-vercel

  2. Observe 404 error when clicking on "Navigate to About page and observe 404 error!" from index page.

Notes:

  • Problem exists when switching from edge to node and vice versa
  • v3_lazyRouteDiscovery must be enabled (bug vanishes when disabled)
  • No problem when hitting the route directly.

System Info

remix 2.15.3, deployed to Vercel, node 22

Used Package Manager

npm

Expected Behavior

No 404 error when using

Actual Behavior

404 error when using and v3_lazyRouteDiscovery

@styxlab
Copy link
Author

styxlab commented Feb 24, 2025

Similar to #10263 but different in that the runtimes play a role.

@styxlab
Copy link
Author

styxlab commented Feb 25, 2025

Note: unlike #10494 and #10497 this error vanishes when v3_lazyRouteDiscovery: false only, i.e. singleFetch can be turned on.

@nicksrandall
Copy link
Contributor

I've run into a similar issue and I added a reproduction here: remix-run/react-router#13117

Do you think your issue is related?

@styxlab
Copy link
Author

styxlab commented Feb 25, 2025

I've run into a similar issue and I added a reproduction here: remix-run/react-router#13117

Do you think your issue is related?

Maybe the root cause is the same, but the symptoms are different in that this case only happens on Vercel infra when using different runtimes, whereas your issue can be reproduced in a local environment.

Copy link
Contributor

Thank you for opening this issue, and our apologies we haven't gotten around to it yet!

With the release of React Router v7 we are sun-setting continued development/maintenance on Remix v2. If you have not already upgraded to React Router v7, we recommend you do so. We've tried to make the upgrade process as smooth as possible with our Future Flags. We are now in the process of cleaning up outdated issues and pull requests to improve the overall hygiene of our repositories.

We plan to continue to address 2 types of issues in Remix v2:

  • Bugs that pose security concerns
  • Bugs that prevent upgrading to React Router v7

If you believe this issue meets one of those criteria, please respond or create a new issue.

For all other issues, ongoing maintenance will be happening in React Router v7, so:

  • If this is a bug, please reopen this issue in that repo with a new minimal reproduction against v7
  • If this is a feature request, please open a new Proposal Discussion in React Router, and if it gets enough community support it can be considered for implementation

If you have any questions you can always reach out on Discord. Thanks again for providing feedback and helping us make our framework even better!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2025
@styxlab
Copy link
Author

styxlab commented May 26, 2025

This bug prevents upgrading to React Router v7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants