BUN 1.0 + Astro
Has anyone tried to deploy a Bun app yet? I am getting this error.
ERROR: failed to solve: process "/bin/bash -ol pipefail -c bun run build" did not complete successfully: exit code: 127
I assume that is because Railway hasn't got to this yet with Bun being so new?
26 Replies
Project ID:
43265ce1-d2dd-42a3-a5c7-1dba1da63c58
43265ce1-d2dd-42a3-a5c7-1dba1da63c58
I have just deployed a bun app and it's working fine (not with astro tho)
whats you package json
I got it working on another service by overriding the build command so I'm assuming i need to make a custom nixpack with the commands
maybe try with
bun --bun astro build
and start: bun --bun astro dev
I got a different error but still failed just failed with bun --bun astro build failed
its failing to build with docker
ok build command = bun install
new error :
Tried but this is the main problem
And I think nixpacks doesent support that version
thank you for trying
cookies, do you develop this astro app with bun 1.0 locally?
i do and it works perfectly on my machine and on another well known platoform i have it deployed
well known platform lol
what is the command you run locally to build your app
Vercel 🙂
i will say vercel is far better suited to host frontend websites
on railway you would need to use astro's node adapter
and astro calls its node adapter a "preview server"
bunx create-astro created all my source files
ahhh
I did not try bun --bun astro preview
can i ask why youd want to run an astro site on railway? railway is more geared towards backend
I run my django and next.js apps on here. Didn't realize railway was not suited for this type of thing since i've had nearly no issues with it till trying to learn bun and try out astro
well its more so its not suited for it without work on your part
as youve proven by opening this thread and saying it worked on vercel without issues
oh no it didnt work on vercel without issues. I still had to override the build commands
I knew there would be issues. Even Railway's documents say they support BUN 1.0 just its new
either way, youd need to use the node adapter and then run the resulting server entrypoint with bun
https://docs.astro.build/en/guides/integrations-guide/node/
Bun is a direct replacement for Node though
or maybe i interpreted that incorrectly
astro doesnt have a bun adapter, youd need to build with the node adapter and run it with bun
and i dont see why you couldn't build the node adapter with bun too
thats just for server side rendering though right?
yes or hybrid
hmm i'll continue to research thi, thanks