3 months ago
Hello,
I keep getting error
╭────────────────╮
│ Railpack 0.4.0 │
╰────────────────╯
↳ Detected Node
↳ Using npm package manager
↳ Installing npm@10.7.0 with Corepack
✖
No start command was foundThe above error was for api deployment from the monorepo structured like this
root
|-- package.json
|-- apps
|-- api
| |-- Dockerfile
| |-- railway.json
|-- web
|-- Dockerfile
|-- railway.jsonWhat am I doing wrong?
9 Replies
3 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
3 months ago
I solved no start command issue by changing my .gitlab-ci.yml from
railway up --service apito
cd apps/api && railway up --service api && cd ../..But after that it's failing for docker issues. I haven't found a full solution yet. Any recommendations would be appreciated.
3 months ago
Looking at https://docs.railway.com/guides/monorepo#deploying-a-shared-monorepo, which reflects how my project is configured, I have the following questions
Is there
railway upinvolved? Which service would it specify?How do I exactly upload the code from
.gitlab-ci.ymlinto railway?Do I have separate build commands for each service?
Are the shared vars available during build?
3 months ago
Trying the approach in the document above..gitlab-ci.yml command
railway up --service api --detachBut back to no start command
↳ Detected Node
↳ Using npm package manager
↳ Installing npm@10.7.0 with Corepack
✖
No start command was found
.
To configure your start command, Railpack will check:
1. A "start" script in your package.json:
"scripts": {
"start": "node index.js"
}3 months ago
Hello,
You change the build and start commands to cd into the directories for each app in the monorepo
3 months ago
I don't have package.json in each app. Do I need to create one for each?
3 months ago
Update:
1. I didn't create service specific package.json (more difficult to maintain).
I had changed build and start commands but did not realize that I had to apply those changes before they take effect.
Once I applied those changes, the
no start commanderror went away.
vinkaga
Update:1. I didn't create service specific package.json (more difficult to maintain).I had changed build and start commands but did not realize that I had to apply those changes before they take effect.Once I applied those changes, the no start command error went away.
3 months ago
So to clarify. This solved your issue?
3 months ago
Yes, it's solved. Thanks.
Status changed to Solved noahd • 3 months ago
Status changed to Solved noahd • 3 months ago