a year ago
Recently I started having a problem with prisma while trying to build my project on railway. The issue is in the name of the thread. 90% of the time I get an error in my building problem, such as:
✕ [stage-0 8/10] RUN --mount=type=cache,id=s/b81f063d-01f0-49fa-bb8b-986a3b95d260-node_modules/cache,target=/app/node_modules/.cache pnpm run build
process "/bin/bash -ol pipefail -c pnpm run build" did not complete successfully: exit code: 1
This happens because Railway couldnt find prisma generate, but the fun fact is that sometimes it manages to build somehow. I redeployed my project like a 100 times and managed to actually build it 2-3 times. I wouldnt create this thread if it wasnt random, but right now I feel like im playing a roulette with the Railway building process. There was once a case where I literally added 1 variable to my railway project and of course it caused the project to be redeployed, but this deployment process resulted in an error, even though my github project remained the same and untouched.
As of right now I have to manually redeploy my project hundreds of times every update in ordeer to actually win over this casino of deployment and get my project working.
Possible issue: I dont really know, but maybe prisma fails to load sometimes or the Railway machine just refuses to work with it.
Need explanation and help, thanks.
5 Replies
Status changed to Awaiting User Response Railway • about 1 year ago
brody
Hello, Are you making sure to run `prisma generate` during build? Best, Brody
a year ago
yes of course. the problem is that Railway cant find prisma generate
Status changed to Awaiting Railway Response Railway • about 1 year ago
a year ago
It seems like the prisma package needs to be correctly installed and available during build but it seems to be flaky for some reason. Could you please try checking to see if switching to Railpack helps? https://railpack.com/
Status changed to Awaiting User Response Railway • about 1 year ago
chandrika
It seems like the `prisma` package needs to be correctly installed and available during build but it seems to be flaky for some reason. Could you please try checking to see if switching to Railpack helps? <https://railpack.com/>
a year ago
Tried out railpack. Didnt help. Had to gamble in order to update again. Had like around 20 unsuccessfull tries, but managed to start it up. As far as I'm concerned the chances it actually finds prisma is around 1 in 100. Sometimes it really does find it, sometimes it breaks. That really amuses me.
Attachments
Status changed to Awaiting Railway Response Railway • about 1 year ago
a year ago
Hello,
It looks like you are running pnpm prisma generate & nest build as the build command.
The single & means the first command is ran in the background without waiting for the command to complete, effectively, you are running the two commands in parallel. This would explain the flakiness and doesn't have much to do with Railway finding prisma.
Instead, you would want to run the commands sequentially with two & like so - pnpm prisma generate && nest build
Best,
Brody
Status changed to Awaiting User Response Railway • about 1 year ago
9 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 10 months ago