-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
build hangs with NODE_ENV=test
#53083
Comments
This was referenced Jul 23, 2023
kodiakhq bot
pushed a commit
that referenced
this issue
Jul 24, 2023
### Why In #52985 the not found solution introduces `NODE_ENV` to determine if it his the not found boundary and should render the not found, as in the next build mode, we have `/_not-found` as a special route which has a empty parallel route, but in next dev mode so far it his the `parallel-default-route`. This could dependend on the `NODE_ENV` passing to next server but not necessarily. ### What Fixes #53082 Fixes #53083 ### How When server actions `not-found` hits, now we create a new loader tree based on the previous one, including `layout` and other components but not the children parallel routes For production case, to make the rendering independent from the `NODE_ENV`, we're using original pathname to check if it's `/_not-found` to determine if it's production build 404 page To support replace the loader tree of action, did a little refactor that passing down the loader tree from top level to `bodyResult`. Then we can change the loader tree itself before rendering, in short, we tweak it from original tree to one for not-found case, so server actions could render it properly
Thanks for #53106 @huozhi and @ijjk 🙌 I can confirm that CodeSandbox: https://codesandbox.io/p/sandbox/awesome-rosalind-ntzj8k?file=%2Fpackage.json%3A13%2C23 |
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.
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.1.0 Relevant Packages: next: 13.4.12 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.5 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
https://codesandbox.io/p/sandbox/reverent-matan-pvw8wk?file=%2F.codesandbox%2Ftasks.json%3A10%2C4
To Reproduce
NODE_ENV=test next build
build-and-start
task, which starts automatically, hangs and never completes💥 (process exits after 3 retries)This may have been caused by the following PR by @huozhi, reviewed by @ijjk :
Describe the Bug
The
not-found
page build hangs when usingNODE_ENV=test
This behavior is not present when using
next@13.4.11
This may have been caused by the following PR by @huozhi, reviewed by @ijjk :
Related issue (not exactly a dupe): #53082
Expected Behavior
The
not-found
page build should succeed when usingNODE_ENV=test
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: