From e692d5ccc70a6e718eb0fe2f2622ec70ef27fc38 Mon Sep 17 00:00:00 2001 From: Jason Paff Date: Tue, 7 Jul 2026 15:34:51 -0400 Subject: [PATCH] fix(api): inline @meldrank/rating into the api bundle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Its package.json has no build output—main/exports point at raw src/index.ts for bundler consumption only. Left external by tsup, the pruned production node_modules resolved that .ts file directly and Node refused to type-strip anything under node_modules (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING), crash-looping meldrank-api at boot since the Glicko-2 deploy (v15, Jul 3). Co-Authored-By: Claude Sonnet 5 --- apps/api/tsup.config.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/api/tsup.config.ts b/apps/api/tsup.config.ts index 8422513..858cb8f 100644 --- a/apps/api/tsup.config.ts +++ b/apps/api/tsup.config.ts @@ -19,5 +19,12 @@ export default defineConfig({ // import pointing at engine's un-compiled TS source. (esbuild's tree-shaking // can drop this reference when it's unreachable, but that's build-environment // dependent — don't rely on it; declare the full transitive closure.) - noExternal: ['@meldrank/fairness', '@meldrank/engine', '@meldrank/shared'], + // + // `@meldrank/rating` has no build output of its own — its package.json + // `main`/`exports` point straight at `./src/index.ts` for bundler + // consumption only. Left external, the pruned production `node_modules` + // resolves that raw `.ts` file and plain `node` refuses to type-strip + // anything under `node_modules` (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING), + // crash-looping the service at boot. + noExternal: ['@meldrank/fairness', '@meldrank/engine', '@meldrank/rating', '@meldrank/shared'], });