From eb4ae11ce40bb313764d265d010dcfa791cc1b8b Mon Sep 17 00:00:00 2001 From: Groom Book CTO Date: Wed, 18 Mar 2026 19:44:24 +0000 Subject: [PATCH] fix(packages): reorder exports conditions to prevent Node.js .ts resolution Node.js v20.20.1 is matching the `types` export condition before `default`, causing ERR_UNKNOWN_FILE_EXTENSION when it tries to load .ts source files at runtime. Moving `default` before `types` ensures Node.js resolves to the compiled .js output first. TypeScript explicitly seeks the `types` condition regardless of key order, so TS resolution is unaffected. Fixes the API container CrashLoopBackOff in the groombook namespace. Co-Authored-By: Paperclip --- packages/db/package.json | 4 ++-- packages/types/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/db/package.json b/packages/db/package.json index 3c8a012..dadfe80 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -7,8 +7,8 @@ "types": "./src/index.ts", "exports": { ".": { - "types": "./src/index.ts", - "default": "./dist/index.js" + "default": "./dist/index.js", + "types": "./src/index.ts" } }, "scripts": { diff --git a/packages/types/package.json b/packages/types/package.json index 9265ada..9d2d7ac 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -7,8 +7,8 @@ "types": "./src/index.ts", "exports": { ".": { - "types": "./src/index.ts", - "default": "./dist/index.js" + "default": "./dist/index.js", + "types": "./src/index.ts" } }, "scripts": { -- 2.52.0