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

404 page is exported to 404/index.html when trailingSlash is enabled #30300

Closed
mdfahadhossain opened this issue Oct 26, 2021 · 3 comments · Fixed by #36827 or #36910
Closed

404 page is exported to 404/index.html when trailingSlash is enabled #30300

mdfahadhossain opened this issue Oct 26, 2021 · 3 comments · Fixed by #36827 or #36910
Labels
area: Routing Routing (next/router, next/navigation, next/link) kind: bug Confirmed bug that is on the backlog

Comments

@mdfahadhossain
Copy link

What version of Next.js are you using?

11.1.2

What version of Node.js are you using?

16.12

What browser are you using?

Firefox

What operating system are you using?

Ubuntu

How are you deploying your application?

next export

Describe the Bug

I don't remember the previous version, but it was working well before. When I updated the next version to 11.1.2, /about exports as /about.html, that's why the doesn't work.
Then I enabled trailingSlash, now the mentioned above case is solved but 404.tsx is also exported as 404/index.html which is not expected according to the static servers.

Expected Behavior

404.tsx should be exported as /404.html even when trailingSlash is enabled.

To Reproduce

N/A

@mdfahadhossain mdfahadhossain added the bug Issue was opened via the bug report template. label Oct 26, 2021
@timneutkens timneutkens added area: Routing Routing (next/router, next/navigation, next/link) kind: bug Confirmed bug that is on the backlog and removed bug Issue was opened via the bug report template. labels Oct 31, 2021
@timneutkens timneutkens modified the milestones: 12.0.2, 12.0.x Oct 31, 2021
@styfle styfle modified the milestones: 12.0.x, 12.0.4 Nov 5, 2021
@timneutkens timneutkens removed this from the 12.0.5 milestone Nov 17, 2021
@romanonatacha
Copy link

any updates? I'm having the same issue

SukkaW added a commit to SukkaW/next.js that referenced this issue May 11, 2022
SukkaW added a commit to SukkaW/next.js that referenced this issue May 11, 2022
@kodiakhq kodiakhq bot closed this as completed in #36827 May 11, 2022
kodiakhq bot pushed a commit that referenced this issue May 11, 2022
## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

The PR fixes #30300.

The previous integration test case only checks if `/out/404.html` exists. However, the test passes since `/out/404.html/index.html` is being exported instead.
The PR changes that by checking if a given path exists and is a file.
@ijjk
Copy link
Member

ijjk commented May 12, 2022

Hi, this has been updated in v12.1.7-canary.5 of Next.js, please update and give it a try!

SukkaW added a commit to SukkaW/next.js that referenced this issue May 14, 2022
kodiakhq bot pushed a commit that referenced this issue May 14, 2022
## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

The PR fixes #30300 and #36855.

The corresponding integration test case has been added.
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: Routing Routing (next/router, next/navigation, next/link) kind: bug Confirmed bug that is on the backlog
Projects
None yet
5 participants