Can't use Pnpm workspaces with Prisma and a Dockerfile, getting errors
megadrive
PROOP

6 months ago

Hi guys, my app was building no worries previously and since I've been forced to Railway Metal it constantly fails build.

The error I'm getting is related to running prisma generate and it seems to not be able to find specific files that should've been installed earlier in the Dockerfile. Any assistance would be amazing, thank you.

My Dockerfile (and repo) is here: https://github.com/megadrive/stremio-letterboxd/blob/main/Dockerfile

$10 Bounty

5 Replies

megadrive
PROOP

6 months ago

595f0025-24b9-441c-b3ce-adcede84bd45


megadrive
PROOP

6 months ago

the specific error is this:
6
RUN pnpm -w prisma:generate
2s

stremio-letterboxd@1.0.0 prisma:generate /app
pnpm --filter @stremio-addon/database prisma generate
@stremio-addon/database@0.0.0 prisma /app/packages/database
prisma generate
Prisma schema loaded from prisma/schema.prisma

Error:

ENOENT: no such file or directory, open '/app/nodemodules/.pnpm/@prisma+client@6.5.0prisma@6.10.1typescript@5.7.3typescript@5.7.3/nodemodules/@prisma/client/runtime/wasm-engine-edge.js'
/app/packages/database:
 ERRPNPMRECURSIVERUNFIRST_FAIL  @stremio-addon/database@0.0.0 prisma: prisma generate
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.


megadrive
PROOP

6 months ago

updated prisma to the latest version and is now working fine


megadrive
PROOP

6 months ago

!s


smolpaw
HOBBY

6 months ago

You can also replace this command
RUN npm install -g pnpm@10.5.0

with this
RUN corepack enable pnpm


Loading...