R
Railway•13mo ago
Cookies

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
Percy
Percy•13mo ago
Project ID: 43265ce1-d2dd-42a3-a5c7-1dba1da63c58
Cookies
Cookies•13mo ago
43265ce1-d2dd-42a3-a5c7-1dba1da63c58
fedev
fedev•13mo ago
I have just deployed a bun app and it's working fine (not with astro tho) whats you package json
Cookies
Cookies•13mo ago
{
"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"
}
}
{
"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
fedev
fedev•13mo ago
Astro Documentation
Use Bun with Astro
Learn how to use Bun with your Astro site.
fedev
fedev•13mo ago
maybe try with bun --bun astro build and start: bun --bun astro dev
Cookies
Cookies•13mo ago
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
$ astro build

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

error: script "astro" exited with code 127
fedev
fedev•13mo ago
Tried but this is the main problem
No description
fedev
fedev•13mo ago
And I think nixpacks doesent support that version
Cookies
Cookies•13mo ago
thank you for trying
Brody
Brody•13mo ago
cookies, do you develop this astro app with bun 1.0 locally?
Cookies
Cookies•13mo ago
i do and it works perfectly on my machine and on another well known platoform i have it deployed
Brody
Brody•13mo ago
well known platform lol what is the command you run locally to build your app
Cookies
Cookies•13mo ago
Vercel 🙂
Brody
Brody•13mo ago
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"
Want results from more Discord servers?
Add your server