From e05557814297bac5a89b6cf40fdfd26b562e279a Mon Sep 17 00:00:00 2001 From: Julien Gautier Date: Sat, 23 May 2026 23:31:27 +0200 Subject: [PATCH] fix(ci): align shared-auth build outputPath with tsconfig.lib.json outDir portal-bff/tsconfig.app.json declares a TypeScript project reference to libs/shared/auth, so when webpack runs tsc against that tsconfig it validates that the referenced project's declarations exist at the location libs/shared/auth/tsconfig.lib.json declares as outDir (dist/out-tsc/libs/shared/auth). But nx's @nx/js:tsc executor was emitting them to dist/libs/shared/auth (the project.json outputPath), so tsc fails with TS6305 "Output file ... has not been built". The mismatch was harmless locally because a manual `tsc --build` during development populated both directories. Fresh CI runners only run nx's executor, so only one directory was populated. Aligning outputPath to dist/out-tsc/libs/shared/auth makes both agree. shared-auth is the first lib in the workspace that's consumed by portal-bff in a way that triggers tsc project-reference validation; the SPA-targeted libs (shared-util, shared-tokens) ride the same mismatch but don't hit it because the Angular build pipeline doesn't validate project references the same way. --- libs/shared/auth/project.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/shared/auth/project.json b/libs/shared/auth/project.json index 0b01023..9db3bae 100644 --- a/libs/shared/auth/project.json +++ b/libs/shared/auth/project.json @@ -9,7 +9,7 @@ "executor": "@nx/js:tsc", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/libs/shared/auth", + "outputPath": "dist/out-tsc/libs/shared/auth", "main": "libs/shared/auth/src/index.ts", "tsConfig": "libs/shared/auth/tsconfig.lib.json", "assets": ["libs/shared/auth/*.md"]