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
Routing error for urls with trailing slash since 5.0.0 #3876
Comments
Fixed in |
@timneutkens I can reproduce this bug in canary 6.0.0-6. |
Unless I'm mistaken, I don't think this is fixed in
It is my understanding that the last 2 - "/pages/nested/index.js" and "/pages/blog.js" should not 404 on the server. |
I can also confirm the bug. |
still not fix in next 6.x |
This is fixed 🎉 |
That's great but I believe that doesn't help non static deployments or apps not hosted with Now. |
Ah, good point on static apps hosted elsewhere. I've never had a trailing slash issue with dynamic deployments, so this fixes the problem for me and likely several other people. |
@timneutkens any status when this will be fixed for non-static deployments / static deployments hosted elsewhere? |
I filed a new issue with minimal reproducible repository in #5214 |
If you want trailing slash, you can just do this. |
This is still not working in next@9.0.4
|
See also this issue with Routing errors and trailing slashes vercel/next.js#3876
Having this issue now |
@reginpv what is your config in next.config.js? |
@Shaquu Looks like updating to latest fixed this for me, I'm not seeing the issue now. Will continue to monitor and if ever saw the issue again will report |
I am seeing the same issue now, but only when I refresh the page. It's even funnier, because I am using a project template with TypeScript, that for some reason always adds a trailing slash to the paths defined in For example: I write |
why this issue closed? anyone have a good advice for handle trailing slash |
See #5214 |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Expected Behavior
Both URLs /foo and /foo/ should render the contents of /pages/foo/index.js.
Current Behavior
/foo works fine, but /foo/ causes a 404 error on SSR and only reconciles later at client side rendering.
Steps to Reproduce (for bugs)
export default () => <div>hello world</div>
Context
Your Environment
The text was updated successfully, but these errors were encountered: