next.js
2e1eb885 - [turbopack] print Turbopack warnings after SSG (#95430)

Commit
39 days ago
[turbopack] print Turbopack warnings after SSG (#95430) Picked up this from "Turbopack Work Ideas 2026": > 4. (S) Turbopack Warnings are before SSG Errors > - Solution: print Turbopack warnings after SSG I think this is a pretty bare-bones fix for this - let me know if the idea was to do something different! See an example output: ``` ✓ Running next.config.js took 6ms ▲ Next.js 16.3.0-canary.75 (Turbopack) Creating an optimized production build ... ✓ Compiled successfully in 889ms Running TypeScript ... Finished TypeScript in 38ms ... Collecting page data using 5 workers ... Generating static pages using 5 workers (0/4) ... Error occurred prerendering page "/boom". Read more: https://nextjs.org/docs/messages/prerender-error Error: boom during prerender at <unknown> (app/boom/page.js:2:9) 1 | export default function Page() { > 2 | throw new Error("boom during prerender") | ^ 3 | } 4 | { digest: '1942497547' } Export encountered an error on /boom/page: /boom, exiting the build. ⨯ Next.js build worker exited with code: 1 and signal: null Turbopack build encountered 1 warning: ./app/join-cwd.js:4:10 Warning: Dynamic filesystem access causes tracing of the whole project 2 | 3 | export default function (f) { > 4 | return path.join(process.cwd(), f)  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 | } 6 | Static analysis determined that this filesystem access causes the whole project to be traced and included in the output. This is usually unintentional and leads to all source files (including the public folder) to be deployed as part of the server code. This can slow down deployments or lead to failures when size limits are exceeded. To resolve this, you can - make sure they are statically scoped to some subfolder: path.join(process.cwd(), 'data', bar), or - only use them in development, or - add ignore comments: path.join(/*turbopackIgnore: true*/ process.cwd(), bar), or - remove them. Import trace: Server Component: ./app/join-cwd.js ./app/page.js ```
Author
Parents
Loading