fix(api/Dockerfile): copy @mana/shared-types into the build context

After the planta + nutriphi modules in apps/api started importing
shared Zod schemas from @mana/shared-types, the runtime crashed in
a restart loop with:

  error: ENOENT reading "/app/apps/api/node_modules/@mana/shared-types"

Same root cause as the @mana/media-client gotcha already in this
Dockerfile: the build context only includes the workspace packages
that are explicitly COPYed, and shared-types was missed when it
became a transitive dependency.

Add the COPY line and rebuild. Also extend the comment block to
make the rule explicit ("when adding a new @mana/* import to any
apps/api module, add the package here too").

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-09 17:25:23 +02:00
parent 5aeae87474
commit 1b26623129

View file

@ -29,10 +29,13 @@ COPY apps/api/package.json ./apps/api/package.json
# Workspace packages that apps/api depends on, plus their transitive
# workspace deps. Listed explicitly so the install layer doesn't pull
# in the entire monorepo.
# in the entire monorepo. When adding a new @mana/* import to any
# apps/api module, add the package here too — otherwise the runtime
# fails with "ENOENT reading /app/apps/api/node_modules/@mana/<x>".
COPY packages/shared-hono ./packages/shared-hono
COPY packages/shared-logger ./packages/shared-logger
COPY packages/shared-storage ./packages/shared-storage
COPY packages/shared-types ./packages/shared-types
# @mana/media-client lives under services/mana-media (sub-package).
COPY services/mana-media/packages/client ./services/mana-media/packages/client