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?
I have just deployed a bun app and it's working fine (not with astro tho)
whats you package json
  "name": "@example/minimal",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "dev": "astro dev",
    "start": "astro dev",
    "build": "astro build",
    "preview": "astro preview",
    "astro": "astro"
  "devDependencies": {
    "@astrojs/sitemap": "^1.0.0",
    "@astrojs/tailwind": "^1.0.0",
    "astro": "^1.0.0",
    "astro-robots-txt": "^0.3.8"

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 :
$ astro build

/bin/bash: line 1: astro: command not found

error: script "astro" exited with code 127
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
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
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

Looking for more? Join the community!

Recommended Posts
Django Railway admin consoleHi! I've had a really good time using Railway thus far, sea-change from setting up an EC2 instance Trouble sending emails via SMTPprojectId: `bb66f5c0-53f9-4e9f-b11f-5965f5d6ec74` serviceId: `b3029692-b78a-4487-bcb0-44e001afecb8` Cannot have a TCP proxy and a domainWhen trying to create a service with a proxy, I'm getting this error. Can I not have a TCP proxy serChange region for Postgres DatabaseHey ! Congratulations for the launch of deployment region ! Now, how can I migrate my db to another Connection Pooling or PgBouncer for Postgres Instances?Hello! Anyone know if the Railway Postgres instance has any sort of connection pooling or pgBouncer?webhook to rebuild serviceHi I have one project: Mongo, PayloadCMS + storage, Nextjs I want to trigger nextjs rebuild after aI paid 40 dollars in subscription fees but its still dont pay my debt for credits.deploy prisma/client not foundhey, when I deploy the prisma client in node_modules is not found because its not generating, I haveCan you explain how usage is estimatedI have an account with a hobby plan subscription, I have a discord bot running on it and a MySQL DB Trying to save a fileTrying to save a file in media/ where can i save files ? PermissionError: [Errno 13] Permission dHelp setup a monorepo - Angular / ExpressHi! Hope everyone is doing well :). I am trying to deploy my Angular application on railway, but it Nose.Js versionhow do i change itVolume creation prevents service from deployingHi! I'm trying to add a volume to a project, but when I attach it to the service, it stops being abldeploy bun 1.0 projectdoes anyone know if and how thats possible on railway currently?Random CPU spike and unresponsive serverWe switched from Vercel to Railway one week ago, and everything was going well until today. For somIncorrect hostname with private networkingI've set `mongo-2.railway.internal` (or mongo-2) as the endpoint name for private networking on the Do I need to configure anything in the Docker Image to support TCP proxy?For some reason I can't use the TCP proxy in the Minecraft Server template, I get "connection reset"Cron JobsHey everyone. I'm moving from Vercel to Railway so this is my first Railway project. I'm trying to iHow to connect FastAPI with Planetscale (mysqlclient error)Hey, how are you guys doing? I have a backend on Railway who is running with FastAPI (using this teHobby PlanI have a Discord bot which needs to be hosted, I had it hosted on railway before the recent pricing