-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Not found page, component loses styles #53210
Comments
I have the same problem here |
Edge runtime doesn't have `/404` entry points as not-found, if server hits 404 it's hitting `/_not-found` entry point of edge bundles unlike nodejs server rendering. In app-render it needs the information that when `pathname` (or can call `pagePath`) is `/404` it can render the `not-found.js` components properly Separate the not-found test suite into 2 parts, a basic case testing all urls with `not-found.js` boundary, and another conflict route case with `not-found.js` with `not-found/` route at the same time Fixes #53652 Fixes #53210
bug is still present. @huozhi would you reopen this issues ? |
@andelkocvjetkovic It's fixed in canary |
@huozhi |
@andelkocvjetkovic Can you try the latest canary? |
I tried with |
Gonna take a deeper look on it 👁️ |
We have similar issue. Navigating from 404, we lose some styles (exactly 1 css chunk is missing). But for us it happens only on hard navigation to 404 then soft navigation to other pages.
Unfortunately, I've been trying to reproduce it in a fresh project with no success (with the same versions it bugs in our project). |
@huozhi I tried with 13.4.20-canary.2 and the issue is fixed. |
Looks like it's fixed in 13.4.19 already and the style is hoist properly after navigation. But one thing looks might not be reliable is that the style in the RSC payload showing |
### Problem One style of `not-found` has `precendence` property with "undefined" value, which can't be handled by React Float, then during navigation the style could not load properly, lead to the style missing in issue #53210. ### Solution Always enable `precendence` for all links, so all the css styles of page and convention components can be hoist by react properly. Float will decide which one should be handled. Previously this change only applies to template, actually we can apply it to all components so that they can all be handled properly especially during client navigation. Related react change: facebook/react#27265 Fixes #53210
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103 Binaries: Node: 20.2.0 npm: 9.8.0 Yarn: 3.2.3 pnpm: 8.6.6 Relevant Packages: next: 13.4.13-canary.3 eslint-config-next: 13.4.12 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.6 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
Link to the code that reproduces this issue or a replay of the bug
code: https://github.com/andelkocvjetkovic/nextjs-bug
link: https://nextjs-bug-tau.vercel.app/
To Reproduce
run
Screen.Recording.2023-07-26.at.14.56.28.mov
Describe the Bug
When navigate back to Home page styles for the button are lost.
Expected Behavior
When navigate back to Home page styles for the button are not lost.
Which browser are you using? (if relevant)
Version 114.0.5735.248 (Official Build) (arm64)
How are you deploying your application? (if relevant)
next start and Varcel
NEXT-1507
The text was updated successfully, but these errors were encountered: