1

I'm attempting to dockerize an application using Elysia, Bun, and Prisma for deployment on render.com. When running a local docker build, I encounter an error related to Prisma generation.

Error:

failed to solve: process "/bin/sh -c bunx prisma generate" did not complete successfully: exit code: 9

Additionally, when trying to build on my host, I receive:

error: Cannot find module ".prisma/client/index" from "/app/node_modules/@prisma/client/index.js"

Dockerfile:

FROM oven/bun

WORKDIR /app

COPY package.json .
COPY bun.lockb .
COPY prisma .

RUN bun install --production

COPY src src
COPY tsconfig.json .

RUN bunx prisma generate

ENV NODE_ENV production
CMD ["bun", "src/index.ts"]

EXPOSE 3000

I've followed the documentation from Elysia and added the Prisma command. I've tried installing Prisma separately within the container and experimented with different command orders. Being relatively new to Docker and aiming for deployment on render.com, I'm unsure what I'm missing or doing incorrectly. Any guidance would be greatly appreciated.

1 Answer 1

0

Had the same issue. This might be of help to you :)

https://github.com/oven-sh/bun/issues/5320

1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Dave M
    Sep 22 at 11:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .