From c54fd88c3259ec7bd62d300cb08b91762e466a38 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 1 Jul 2026 19:40:23 -0400 Subject: [PATCH] fix(docker): copy workspace package.json files before npm install npm workspaces needs shared/package.json and server/package.json present at install time to link @ttrpg/shared, otherwise the build stage fails with "Module not found: Error: Can't resolve '@ttrpg/shared'". Co-Authored-By: Claude Sonnet 5 --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9191172..415e43a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,11 @@ LABEL stage="build-local-testing" WORKDIR /app -# Copy package.json and package-lock.json (or yarn.lock) +# Copy root package.json/lockfile plus workspace manifests so npm can +# resolve the @ttrpg/shared and server workspace links during install. COPY package*.json ./ +COPY shared/package.json ./shared/ +COPY server/package.json ./server/ # Install dependencies using the lock file for consistency RUN npm install