R
Railway

✋|help

BUN 1.0 + Astro

Mmi1knc0okies9/10/2023
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?
Mmi1knc0okies9/10/2023
43265ce1-d2dd-42a3-a5c7-1dba1da63c58
Ffedev1009/10/2023
I have just deployed a bun app and it's working fine (not with astro tho)
whats you package json
Mmi1knc0okies9/10/2023
{
  "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
Ffedev1009/10/2023
https://docs.astro.build/en/recipes/bun/
maybe try with bun --bun astro build
and start: bun --bun astro dev
Mmi1knc0okies9/10/2023
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
Ffedev1009/10/2023
Tried but this is the main problem
Ffedev1009/10/2023
And I think nixpacks doesent support that version
Mmi1knc0okies9/10/2023
thank you for trying
Bbrody1929/10/2023
cookies, do you develop this astro app with bun 1.0 locally?
Mmi1knc0okies9/10/2023
i do and it works perfectly on my machine and on another well known platoform i have it deployed
Bbrody1929/10/2023
well known platform lol
what is the command you run locally to build your app
Mmi1knc0okies9/10/2023
Vercel 🙂
Bbrody1929/10/2023
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"
Mmi1knc0okies9/10/2023
bunx create-astro created all my source files
ahhh
I did not try bun --bun astro preview
Bbrody1929/10/2023
can i ask why youd want to run an astro site on railway? railway is more geared towards backend
Mmi1knc0okies9/10/2023
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
Bbrody1929/10/2023
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
Mmi1knc0okies9/10/2023
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
Bbrody1929/10/2023
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/
Mmi1knc0okies9/10/2023
Bun is a direct replacement for Node though
or maybe i interpreted that incorrectly
Bbrody1929/10/2023
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
Mmi1knc0okies9/10/2023
thats just for server side rendering though right?
Bbrody1929/10/2023
yes or hybrid
Mmi1knc0okies9/10/2023
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