From 1b26623129cc2cea3fbca45c9907aeeca5778382 Mon Sep 17 00:00:00 2001 From: Till JS Date: Thu, 9 Apr 2026 17:25:23 +0200 Subject: [PATCH] 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) --- apps/api/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index 828e3bf42..1536a7dee 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -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/". 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