prisma can't generate

I am trying to run a discord bot which uses prisma and when i try and generate the client it fails in the build process with this error:
-----

> [stage-0 6/8] RUN --mount=type=cache,id=s/63171f9f-ac46-4ba3-97d1-af608745888a-/root/npm,target=/root/.npm npm ci:

2.031 > basebot@1.0.0 postinstall

2.031 > prisma generate

2.031

2.041 sh: 1: prisma: Permission denied

2.044 npm ERR! code 127

2.045 npm ERR! path /app

2.047 npm ERR! command failed

2.047 npm ERR! command sh -c prisma generate

2.048

2.048 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-11T01_29_03_288Z-debug-0.log

-----
-----

> [stage-0 6/8] RUN --mount=type=cache,id=s/63171f9f-ac46-4ba3-97d1-af608745888a-/root/npm,target=/root/.npm npm ci:

2.031 > basebot@1.0.0 postinstall

2.031 > prisma generate

2.031

2.041 sh: 1: prisma: Permission denied

2.044 npm ERR! code 127

2.045 npm ERR! path /app

2.047 npm ERR! command failed

2.047 npm ERR! command sh -c prisma generate

2.048

2.048 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-11T01_29_03_288Z-debug-0.log

-----
Solution:
i fixed this by changing the postinstall script from "prisma generate" to "npx prisma generate"
Jump to solution
3 Replies
Percy
Percy6mo ago
Project ID: 63171f9f-ac46-4ba3-97d1-af608745888a
Brody
Brody6mo ago
this is sometimes caused by including various build files in your repo
Solution
celebrations
celebrations6mo ago
i fixed this by changing the postinstall script from "prisma generate" to "npx prisma generate"