Skip to content

Commit ed3d75a

Browse files
ismoilovdevmlclaude
andcommitted
Fix admin user creation: copy all node_modules to Docker image
- Copy full node_modules instead of just Prisma modules - Fixes 'Cannot find module bcryptjs' error during seed - Ensures tsx and all dependencies available for admin user creation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 00a4bd9 commit ed3d75a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ RUN chown nextjs:nodejs .next
4646
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
4747
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
4848

49-
# Copy Prisma files (needed for migrations and seeding)
50-
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/.prisma ./node_modules/.prisma
51-
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/@prisma ./node_modules/@prisma
49+
# Copy node_modules (needed for seeding with tsx and bcryptjs)
50+
COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules
51+
52+
# Copy Prisma schema
5253
COPY --from=builder --chown=nextjs:nodejs /app/prisma ./prisma
5354

5455
USER nextjs

0 commit comments

Comments
 (0)