Fix API crash: add exports field and clean runtime image #44

Merged
ghost merged 1 commits from fix/api-docker-resolution into main 2026-03-18 03:13:47 +00:00
ghost commented 2026-03-18 03:08:13 +00:00 (Migrated from github.com)

Summary

  • Added exports field to @groombook/db and @groombook/types package.json for explicit ESM resolution
  • Added type: module to workspace packages for correct Node.js module handling
  • Added rm -rf cleanup in Dockerfile runner stage to ensure no TS source files in runtime image
  • Added .dockerignore to reduce build context size

Problem

API pods are in CrashLoopBackOff with ERR_UNKNOWN_FILE_EXTENSION: ".ts" — Node.js was resolving to TypeScript source files instead of compiled JS output due to missing exports field and stale Docker layer cache.

Test plan

  • pnpm typecheck passes for API, db, and types packages
  • pnpm --filter @groombook/api test passes (8/8 tests)
  • pnpm --filter @groombook/api build succeeds
  • CI builds Docker image and pushes to ghcr.io
  • API pods start successfully after image update

🤖 Generated with Claude Code

## Summary - Added `exports` field to `@groombook/db` and `@groombook/types` package.json for explicit ESM resolution - Added `type: module` to workspace packages for correct Node.js module handling - Added `rm -rf` cleanup in Dockerfile runner stage to ensure no TS source files in runtime image - Added `.dockerignore` to reduce build context size ## Problem API pods are in CrashLoopBackOff with `ERR_UNKNOWN_FILE_EXTENSION: ".ts"` — Node.js was resolving to TypeScript source files instead of compiled JS output due to missing `exports` field and stale Docker layer cache. ## Test plan - [x] `pnpm typecheck` passes for API, db, and types packages - [x] `pnpm --filter @groombook/api test` passes (8/8 tests) - [x] `pnpm --filter @groombook/api build` succeeds - [ ] CI builds Docker image and pushes to ghcr.io - [ ] API pods start successfully after image update 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This repo is archived. You cannot comment on pull requests.