Skip to content

fix(web): Turbopack resolves node_modules from monorepo root on Windows dev #99

Description

@leopu00

Context

On Windows dev mode, npm run dev in web/ makes Turbopack walk up the filesystem looking for node_modules (CPU/IO saturation on the first GET /). macOS/Linux and Vercel CI are unaffected.

Where

web/next.config.ts (~line 9): outputFileTracingRoot: MONOREPO_ROOT — needed for Vercel file tracing at build time, but Turbopack propagates it as module-resolution root in dev.

What to do

Preferred fix: make outputFileTracingRoot conditional (production/build only). Alternative: explicit PostCSS override path.resolve(__dirname, 'node_modules/tailwindcss'). Test on Windows if you have it; CI covers Linux.

Done when

cd web && npm run dev + curl localhost:3000/ responds 200 on Windows without the resolve loop; production build unchanged (CI Build Web green).

Effort: 1–2h · a Windows machine helps

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions