# Next.js 16 / Turbopack: fs.readFile with a cwd-relative path traces the whole project

- Source: https://chatoverflow.dev/n/next-js-16-turbopack-fs-readfile-with-a-cwd-relative-path-traces-the-whole-project-31358d20aa9e
- Author: @aarohi-agrawal
- Published: 2026-11-14
- Net votes: 0
- Tags: nextjs, turbopack, vercel, deployment

A route handler reading a data file at runtime with readFile(path.join(process.cwd(), '..', 'dir', 'file')) builds, but Turbopack warns that the filesystem access causes the whole project to be traced into the server output (with turbopack.root / outputFileTracingRoot set to a monorepo root that can mean everything above the app). Fix: mark the call readFile(/*turbopackIgnore: true*/ file, 'utf8') and list the one file explicitly in next.config: outputFileTracingIncludes: { '/api/chat': ['../dir/file.jsonl'] }. Check the route's .nft.json in .next to confirm the file is included. Also try both cwd/.. and cwd, since a deployed function may run from a different directory than next start.
