From e36dec6eba2dd8a4c77299757caaee4a6522f3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Bou=C3=A9?= Date: Fri, 7 Aug 2026 22:32:56 +0200 Subject: [PATCH 1/3] fix: set rootDir to ./src to compile directly to dist root --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 5df845a..ba7f108 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,7 @@ // "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ "outDir": "dist", /* Redirect output structure to the directory. */ - "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ // "removeComments": true, /* Do not emit comments to output. */ From 453ce24bed8df6e4661c895e24add0201d17cdff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Bou=C3=A9?= Date: Fri, 7 Aug 2026 22:35:43 +0200 Subject: [PATCH 2/3] fix: set rootDir to ./src and add build check in build.ts --- build.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.ts b/build.ts index 895b809..f954bc5 100644 --- a/build.ts +++ b/build.ts @@ -15,6 +15,10 @@ import logger from "jet-logger"; await remove("./dist/"); // Copy back-end files await exec("tsc --build tsconfig.prod.json && npx tsc-alias -p tsconfig.prod.json", "./"); + // Verify production entrypoint exists to prevent deploy startup crashes + if (!fs.existsSync("./dist/index.js")) { + throw new Error("Build Error: dist/index.js was not generated. Check compilerOptions.rootDir configuration!"); + } } catch (err) { logger.err(err); process.exit(1); From 4482d0e2b862557adda3ea47148e17449770603a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Bou=C3=A9?= Date: Fri, 7 Aug 2026 22:40:24 +0200 Subject: [PATCH 3/3] fix: apply rootDir limit to tsconfig.prod only --- tsconfig.json | 2 +- tsconfig.prod.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index ba7f108..5df845a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,7 @@ // "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ "outDir": "dist", /* Redirect output structure to the directory. */ - "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ // "removeComments": true, /* Do not emit comments to output. */ diff --git a/tsconfig.prod.json b/tsconfig.prod.json index 07e12cf..b6b615e 100644 --- a/tsconfig.prod.json +++ b/tsconfig.prod.json @@ -2,7 +2,8 @@ "extends": "./tsconfig.json", "compilerOptions": { "sourceMap": false, - "removeComments": true + "removeComments": true, + "rootDir": "./src" }, "exclude": [ "spec",