fix(docker): copy full deps stage into storefront builder, not just root node_modules
@heroui/react cannot be hoisted to the root by npm (peer dep constraints) and is installed at apps/storefront/node_modules/ instead. The builder stage was only copying /app/node_modules, leaving @heroui/react absent when next build ran. Switch to COPY --from=deps /app/ ./ so both root and workspace-level node_modules are present, then COPY full/ . layers the source on top. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,12 @@ FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
# Copy everything from the deps stage — not just /app/node_modules.
|
||||
# @heroui/react cannot be hoisted to the root by npm and is installed at
|
||||
# apps/storefront/node_modules/ instead. Copying only the root node_modules
|
||||
# would leave it missing. Copying all of /app/ brings both root and
|
||||
# workspace-level node_modules, then full/ layers the source on top.
|
||||
COPY --from=deps /app/ ./
|
||||
COPY full/ .
|
||||
|
||||
# NEXT_PUBLIC_* vars are baked into the client bundle at build time by Next.js.
|
||||
|
||||
Reference in New Issue
Block a user