a month ago
We're in the process of migrating from Nixpack to Railpack and running into the issue where the startCommand in the deploy property is not being recognized by Railway. See the config and error below.
Gotten from the docs here: https://railpack.com/config/file
{
"$schema": "https://schema.railpack.com",
"steps": {
"install": {
"commands": [
"pnpm install"
]
},
"build": {
"inputs": [
{
"step": "install"
}
],
"commands": [
"moon backoffice-api:build"
]
}
},
"deploy": {
"startCommand": "moon backoffice-api:start"
}
} ✖ No start command detected. Specify a start command: https://railpack.com/config/file
5 Replies
Thanks for the railpack.json. I'll be looking into this, will have a resolution here next week!
a month ago
Hey, is there a chance for a answer on this thread?
a month ago
Quick Fix Checklist:
-
Ensure Railway is set to use Railpack (not Nixpack) as the build provider in service settings
-
Add "..." as the first entry in build.commands to preserve auto-generated steps: "commands": ["...", "moon backoffice-api:build"]
-
Add "inputs": [{"step": "build"}] to the deploy block so the built output is properly carried into the final image
18 days ago
@maxoosterveen I looked into this for you and was not able to replicate it. My guess is your railpack.json (which looks fine) is not in the right directory, although it could be something way more sneaky.
Could you get me more information to help debug?
treeorlsoutput of your main project dir. Goal is understanding what the file structure of the project is.- If there's no sensitive information in your build log from Railway, that would be really helpful to take a look at.
- I'm assuming it's not an open source repo, but if it it (or if you can replicate it in a open repo) that would be super helpful to take a look at.