From 5d854a7db0aaaeb6dbcd4c37aebc17d5828e5996 Mon Sep 17 00:00:00 2001 From: Tom Scanlan Date: Thu, 14 May 2026 22:40:00 -0400 Subject: [PATCH] fix(contrail): run sync from compiled dist, not ts-node src The production Docker image only ships dist/; src/ is removed in the release stage (except mail templates). The CronJob's `npm run contrail:sync` was invoking `ts-node ./src/contrail/sync.ts`, which fails immediately in-cluster with "Cannot find module './sync.ts'". Switch the npm script to `node dist/contrail/sync.js`. sync.ts only uses relative imports (no NestJS path aliases), so tsconfig-paths isn't needed. The smoke command stays on ts-node because it's a developer tool run against local TypeScript. Surfaced when manually triggering the suspended contrail-sync CronJob during Phase 1 dev validation. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 12316d69..61a7d237 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "migration:revert:tenant": "env-cmd ts-node -r tsconfig-paths/register ./src/database/revert-tenant-migration.ts", "migration:run:prod": "ts-node -r tsconfig-paths/register ./src/database/run-multi-tenant-migrations.ts", "backfill:activity-feeds": "env-cmd ts-node -r tsconfig-paths/register ./src/database/backfill-activity-feeds.ts", - "contrail:sync": "ts-node -r tsconfig-paths/register ./src/contrail/sync.ts", + "contrail:sync": "node dist/contrail/sync.js", "contrail:smoke": "ts-node -r tsconfig-paths/register ./src/contrail/smoke-server.ts", "seed:run:prod": "ts-node -r tsconfig-paths/register ./src/database/seeds/relational/run-seed.ts --tenant-config=./config/tenants.json", "schema:drop": "npm run typeorm -- --dataSource=src/database/data-source.ts schema:drop",