From 84d44442813a11998a32789ee7a16d19052548e8 Mon Sep 17 00:00:00 2001 From: os-zhuang Date: Sat, 4 Jul 2026 09:07:34 +0800 Subject: [PATCH] fix(build): exclude node_modules from turbo tsbuildinfo outputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build `outputs` glob `**/*.tsbuildinfo` (added in #1767 to cache composite tsc .tsbuildinfo) also matched tsbuildinfo files reachable through pnpm's workspace symlinks under `node_modules/@object-ui/*`. Turbo cached those paths and, on cache restore, recreated them as real directories — clobbering the pnpm symlinks. The workspace links degraded into empty dirs holding only `tsconfig.tsbuildinfo` (plus `.ignored_*` twins), so rolldown could no longer resolve `@object-ui/i18n` et al. and `pnpm build` failed in @object-ui/runner. Add `!**/node_modules/**` to the outputs so turbo never captures or restores anything under node_modules, while still caching the package-root `tsconfig.tsbuildinfo` that #1767 relies on. Co-Authored-By: Claude Opus 4.8 --- turbo.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/turbo.json b/turbo.json index 20119379bb..6d48751703 100644 --- a/turbo.json +++ b/turbo.json @@ -4,7 +4,13 @@ "tasks": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**", ".next/**", "build/**", "**/*.tsbuildinfo"], + "outputs": [ + "dist/**", + ".next/**", + "build/**", + "**/*.tsbuildinfo", + "!**/node_modules/**" + ], "env": ["NODE_ENV", "VITE_BASE_PATH", "OBJECTSTACK_CLIENT_DIST"] }, "test": {