Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(build): keep tsbuildinfo inside dist so nest deleteOutDir cannot strand it

Yudhi Armyndharis726c5cb15aed
diff --git a/tsconfig.build.json b/tsconfig.build.json
index 47d93877b..dd2f0778a 100644
--- a/tsconfig.build.json
+++ b/tsconfig.build.json
@@ -2,7 +2,11 @@
"extends": "./tsconfig.json",
"compilerOptions": {
// TypeScript 6 requires the output layout anchor to be explicit (TS5011).
- "rootDir": "./src"
+ "rootDir": "./src",
+ // Keep the incremental cache inside outDir: TypeScript 6 moved the default next to this
+ // config file, where nest's deleteOutDir no longer wipes it — tsc then trusted the stale
+ // cache, emitted nothing, and `node dist/main` crashed with MODULE_NOT_FOUND (issue #891).
+ "tsBuildInfoFile": "./dist/tsconfig.build.tsbuildinfo"
},
"exclude": ["node_modules", "test", "dist", "**/*spec.ts", "dashboard"],
"include": ["src"]