fef6f82aba
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> |
||
---|---|---|
.. | ||
acceptance | ||
acceptance-app | ||
api-cors-with-rewrite | ||
api-route-errors | ||
app-dir/multiple-compiles-single-route | ||
app-hmr | ||
app-render-error-log | ||
basic | ||
client-dev-overlay | ||
correct-tsconfig-defaults | ||
dotenv-default-expansion | ||
gssp-notfound | ||
jsconfig-path-reloading | ||
middleware-warnings | ||
next-font | ||
project-directory-with-styled-jsx-suffix | ||
repeated-dev-edits | ||
tsconfig-path-reloading | ||
typescript-auto-install | ||
watch-config-file | ||
webpack-issuer-deprecation-warning |