From 2a909d9b2838531751d4aa28aa1187da512027d9 Mon Sep 17 00:00:00 2001 From: Dhravya Shah Date: Thu, 6 Aug 2026 18:57:50 -0700 Subject: [PATCH] fix(web): pin Turbopack root to monorepo to stop dev RAM blowups Next 16 infers workspace root from parent lockfiles. Stray package.json files under ~/ and ~/code made Turbopack watch the entire tree and exhaust memory during next dev. Explicitly set turbopack.root and outputFileTracingRoot to the monorepo root. --- apps/web/next.config.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index c4992e71b..1a6f07ef4 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -1,7 +1,16 @@ +import path from "node:path" +import { fileURLToPath } from "node:url" import { withSentryConfig } from "@sentry/nextjs" import type { NextConfig } from "next" +const appDir = path.dirname(fileURLToPath(import.meta.url)) +const monorepoRoot = path.join(appDir, "../..") + const nextConfig: NextConfig = { + turbopack: { + root: monorepoRoot, + }, + outputFileTracingRoot: monorepoRoot, typescript: { ignoreBuildErrors: true, },