rsnext/test
Zack Tanner fef6f82aba
Add docs page for uncaught DynamicServerErrors (#53402)
When using imports from `next/headers` in a layout or page,
`StaticGenerationBailout` will throw an error to indicate Next.js should
fallback to dynamic rendering. However, when async context is lost, this
error is uncaught and leads to a confusing error message at build time.

This attempts to improve DX surrounding this error by linking out to a
page that explains when it might happen. I've also tweaked
`StaticGenerationBailout` to always throw a fully descriptive reason as
opposed to just `DynamicServerError: Dynamic server usage: cookies`

Closes NEXT-1181
Fixes #49373

---------

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-08 12:49:53 +02:00
..
.stats-app chore: update to pnpm@8.6.11 (#50923) 2023-08-04 19:40:20 +00:00
__mocks__ [edge] bump @edge-runtime/* package suite (#49092) 2023-05-31 08:03:20 +00:00
development Add docs page for uncaught DynamicServerErrors (#53402) 2023-08-08 12:49:53 +02:00
e2e Add docs page for uncaught DynamicServerErrors (#53402) 2023-08-08 12:49:53 +02:00
examples feat(cli): introduce --tailwind flag (#46927) 2023-03-16 16:06:27 +01:00
integration chore: update to pnpm@8.6.11 (#50923) 2023-08-04 19:40:20 +00:00
lib Revert "Implement new forking technique for vendored packages. (#51083)" (#53640) 2023-08-06 13:00:12 -07:00
production fix(next/image): don't call ReactDOM.preload if missing, such as jest (#53443) 2023-08-08 01:04:40 +00:00
unit add unit test case for next.rs api (#53679) 2023-08-07 19:26:44 +02:00
.gitignore ci(workflow): enable test trace upload (#51107) 2023-06-12 17:14:13 +00:00
jest-setup-after-env.ts type check tests (and convert next-test-utils.js to ts) (#51071) 2023-06-23 17:42:50 +00:00
jest.d.ts refactor smooth scroll bailout logic in app navigations (#53186) 2023-07-27 14:39:51 +00:00
readme.md refactor: split up CONTRIBUTING.md (#40515) 2022-09-16 14:54:58 -07:00
test-file.txt
turbopack-tests-manifest.js enable more test cases for next.rs api (#53670) 2023-08-07 15:17:23 +02:00

See Testing for more information on how you can run/write/debug tests for Next.js.