Deploying to Railway

I am adding prisma orm to my elysia js project. I was wondering if i needed to modify my railway custom start command to run the migration before starting the elysia app, or if railway should defaultly handle this. I tried searching before making a post but couldnt find any info of people adding this to their deployment pipeline. every tutorial had people manually doing the migration
5 Replies
Simply Emu
Simply EmuOP12mo ago
I am getting this error when trying to deploy there
error: Could not resolve: ".prisma/client/index-browser". Maybe you need to "bun install"?

#12 0.415 const prisma = require('.prisma/client/index-browser')

#12 0.415 ^

#12 0.415 /app/node_modules/@prisma/client/index-browser.js:1:24 23



#12 0.424 error: script "build" exited with code 1 (SIGHUP)

#12 ERROR: process "/bin/bash -ol pipefail -c bun run build" did not complete successfully: exit code: 1

-----

> [stage-0 8/10] RUN --mount=type=cache,id=s/41fc0ed0-fdbf-449f-b6e1-7f89b813d8d4-node_modules/cache,target=/app/node_modules/.cache bun run build:

0.307 $ bun build src/index.ts

0.415

0.415

0.415 error: Could not resolve: ".prisma/client/index-browser". Maybe you need to "bun install"?

0.415 const prisma = require('.prisma/client/index-browser')

0.415 ^

0.415 /app/node_modules/@prisma/client/index-browser.js:1:24 23

0.424 error: script "build" exited with code 1 (SIGHUP)
error: Could not resolve: ".prisma/client/index-browser". Maybe you need to "bun install"?

#12 0.415 const prisma = require('.prisma/client/index-browser')

#12 0.415 ^

#12 0.415 /app/node_modules/@prisma/client/index-browser.js:1:24 23



#12 0.424 error: script "build" exited with code 1 (SIGHUP)

#12 ERROR: process "/bin/bash -ol pipefail -c bun run build" did not complete successfully: exit code: 1

-----

> [stage-0 8/10] RUN --mount=type=cache,id=s/41fc0ed0-fdbf-449f-b6e1-7f89b813d8d4-node_modules/cache,target=/app/node_modules/.cache bun run build:

0.307 $ bun build src/index.ts

0.415

0.415

0.415 error: Could not resolve: ".prisma/client/index-browser". Maybe you need to "bun install"?

0.415 const prisma = require('.prisma/client/index-browser')

0.415 ^

0.415 /app/node_modules/@prisma/client/index-browser.js:1:24 23

0.424 error: script "build" exited with code 1 (SIGHUP)
ArrowMember3
ArrowMember32mo ago
did you resolve this problem ?
Nurul
Nurul2mo ago
@ArrowMember3 Can you share the entire error message you are getting?
ArrowMember3
ArrowMember32mo ago
Similar, but not identical. Hoped that @SimplyEmu solution would help me. I am building an app in remix using prisma, however struggling to even hook up prisma.
No description
Nurul
Nurul2mo ago
Which package manager are you using? I think you are running into this issue: https://github.com/prisma/prisma/issues/1439
GitHub
Support for Yarn 2+ with PnP/Plug'n'Play · Issue #1439 · prisma/pri...
When trying to run prisma2 init via yarn dlx it fails in the following way: Getting the same behavior when having installed prisma2 as a local dev dependency: I'm using yarn 2.0.0-rc.27

Did you find this page helpful?