Fix Docker build: disable Turbopack for file: linked SDK compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-14 19:27:38 -07:00
parent 9d3c8ee5dc
commit 0e05f3a5ab
1 changed files with 7 additions and 3 deletions

View File

@ -12,14 +12,18 @@ COPY encryptid-sdk /encryptid-sdk/
# Install dependencies
RUN npm ci || npm install
# Copy source files
# Copy source files, then restore node_modules
COPY rvote-online/ .
RUN rm -rf node_modules .next
# Re-install to get clean node_modules with SDK resolved
RUN npm ci || npm install
# Generate Prisma client
RUN npx prisma generate
# Build the application
RUN npm run build
# Build the application (use webpack - Turbopack has issues with file: linked subpath exports)
RUN npx next build --no-turbopack
# Production stage
FROM node:20-alpine AS runner