R
Railway7mo ago
dan

Bun

Is railway compatible with bun? I'm looking to switch from nodejs to bun and want to make sure railway supports it.
Solution:
if you still have an npm/pnpm/yarn lock file then node is going to be used instead
Jump to solution
16 Replies
Percy
Percy7mo ago
Project ID: N/A
dan
danOP7mo ago
N/A
Medim
Medim7mo ago
yes but it doesn't use Bun's latest version, you can do what is mentioned here to use the latest version https://discord.com/channels/713503345364697088/1240557730436087808/1240557730436087808
dan
danOP7mo ago
Are there any guides on how to switch to bun? I don't know how to do it myself and it's low key confusing I can't find it under providers either
dan
danOP7mo ago
I've already done the migration and it works well locally. However on railway it keeps telling me the bun command does not exist?
Brody
Brody7mo ago
do you have a bun lock file? and only a bun lock file?
Solution
Brody
Brody7mo ago
if you still have an npm/pnpm/yarn lock file then node is going to be used instead
dan
danOP7mo ago
Yes
Brody
Brody7mo ago
nixpacks or Dockerfile?
dan
danOP7mo ago
Neither Not on this branch at least Actually, I might have deployed the wrong branch Give me a second to check
Brody
Brody7mo ago
if you are having railway build the image, it has to be one or the other
dan
danOP7mo ago
I'm running a branch where the npm files are still here, that's probably causing it. I'll switch over when I get home and see if it works
Brody
Brody7mo ago
sounds good
dan
danOP7mo ago
Alright I modified the branch and removed the package-lock.json file & added bun.lockb Let's see if it builds now Seems to be running fine
Brody
Brody7mo ago
Great!
Want results from more Discord servers?
Add your server