Open
Description
Provide environment information
System:
OS: macOS 15.0.1
CPU: (8) arm64 Apple M2
Memory: 89.05 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.9.0 - ~/Library/Caches/fnm_multishells/23543_1730102638399/bin/node
npm: 10.2.5 - ~/Library/Caches/fnm_multishells/23543_1730102638399/bin/npm
pnpm: 9.4.0 - ~/Library/Caches/fnm_multishells/23543_1730102638399/bin/pnpm
Describe the bug
Pages are not generated statically when prefetching in a page or directly in a layout. If we remove all prefetch (be it await
or void
) then pages are generated statically.
Its mostly an issue when fetching some data from a CMS, as prefetch all or each the data from CMS will be a good way to render page statically
Tried to use next 15's static page symbol after upgrading, there also no static page symbol is showing when prefetching at the page/layout
Reproduction repo
https://github.com/t3-oss/create-t3-app
To reproduce
- Scaffold the app with
- App router
- tRPC
- Tailwind
- Update the build script with
--debug
- You'll get
Static generation failed due to dynamic usage on /, reason: headers