3 months ago
I have a sveltekit app that is running well on Railway. I use the 'serverless' mode to make the app sleep when not in use. Whenever i push new updates and generate a new build, Railway logs the start command as an error. Any ideas why this would happen?
The app starts up as expected but these errors are still showing up.
Attachments
Pinned Solution
3 months ago
Yeah I’ve seen that before too, found this on GitHub
https://github.com/oven-sh/bun/issues/24990#issuecomment-3579912964
Seems like they don’t want to write to stdout for things that aren’t actually coming from the running program so they write their “$ inside-script” message to stderr hence why it’s getting logged as such
5 Replies
3 months ago
Are there any other error messages that appeared along with this one?
Have you made sure that bun is installed correctly?
3 months ago
I can't see any other errors. I've attached a screenshot with more context. You can see that the container goes to sleep, then wakes up and the 'bun start' command runs. I've also tried switching between Railpack and Nixpacks and disabling the "Use Metal Build Environment"
My package.json scripts:
"scripts": {
"dev": "bunx --bun vite",
"build": "bunx --bun vite build",
"preview": "bunx --bun vite preview",
"lint": "prettier --check . && eslint .",
"start": "PORT=8080 bun run ./build",
}When i run it locally, i get:
$ PORT=8080 bun run ./build
Listening on http://0.0.0.0:8080/
It's not a huge issue, but it may bury some legitimate errors..
3 months ago
Yeah I’ve seen that before too, found this on GitHub
https://github.com/oven-sh/bun/issues/24990#issuecomment-3579912964
Seems like they don’t want to write to stdout for things that aren’t actually coming from the running program so they write their “$ inside-script” message to stderr hence why it’s getting logged as such
3 months ago
Custom start command solved the issue. Thanksbun --silent start
I also tried updating my start command to
"start": "bun --silent ./build",but this didnt work.
Status changed to Solved brody • 3 months ago
alexvdvalk
Custom start command solved the issue. Thanksbun --silent startI also tried updating my start command to"start": "bun --silent ./build",but this didnt work.
2 days ago
Coming back here. So you have to remember to update the custom start command in your service so you don't get this errorbun --silent start
NOT the start command in your package.json.
Status changed to Open Railway • 2 days ago