henrikvtcodes
HOBBYOP
4 months ago
I have a sveltekit app that uses Bun. When switched over to Railpack, it fails to build with this error:
exec /app/node_modules/.bin/bun: exec format error
ERROR: failed to build: failed to solve: process "bun run build" did not complete successfully: exit code: 2553 Replies
I got it to work by adding a railway.json file to my repo with this content:
{
"$schema": "https://railway.com/railway.schema.json",
"build": {
"builder": "RAILPACK",
"buildCommand": "bun svelte-kit sync && bun run build"
}
}From looking at the build logs, I think before adding that config file, it was trying to bun run build inside the container and the bun executable wasn't resolving properly
@Henrik do you have a package.json > scripts > build command? Does that work locally?
railPack should pick up the build commands that work for you locally and replicate those within the build process. So I'm curious what went wrong here.