fix(packages): reorder exports conditions to fix API crash #52
Reference in New Issue
Block a user
Delete Branch "fix/db-exports-condition-order"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
exportsconditions inpackages/db/package.jsonandpackages/types/package.jsonsodefaultcomes beforetypestypesexport condition and attempting to load.tssource files at runtime (ERR_UNKNOWN_FILE_EXTENSION)typescondition regardless of key orderRoot Cause
The API pod (
api-5978bb6f64-jg5g7) is in CrashLoopBackOff with 9+ restarts. Pod logs show:Node.js is resolving
@groombook/dbvia thetypesexport condition (./src/index.ts) instead ofdefault(./dist/index.js). By reordering conditions sodefaultappears first, Node.js matches it immediately.Test plan
pnpm devstill works locally with correct TypeScript resolution🤖 Generated with Claude Code