Error: No start command could be found

isabelmoraes
TRIALOP

a year ago

Error: No start command could be found

9 Replies

a year ago

Hello,

You need a start script in your package.json


isabelmoraes
TRIALOP

a year ago

I am creating an app with a backend and front end. should I set the start at the .json of the front, back or app (that has both of them?)


a year ago

Is it a isolated monorepo?


isabelmoraes
TRIALOP

a year ago

sorry, I'm not sure what you mean. I have without a start->
app/package.json

at my app/backend/package.json

"scripts": {   
 "start": "node ./build/server.js",

and at my app/frontend/package.json

 "scripts": {
    "dev": "vite --open",

a year ago

Please share your repo.


isabelmoraes
TRIALOP

a year ago

https://github.com/IsabelMoraes/isabel-moraes-futebolClube


a year ago

Do the frontend and backend share packages or libraries?


isabelmoraes
TRIALOP

a year ago

they dont


a year ago

You need two Railway services, one for the frontend and one for the backend.

Then in each service settings, set the applicable root directory.

And for the frontend, use the Dockerfile and Caddyfile shown here -

https://docs.railway.app/guides/react#use-a-dockerfile

But in the Caddyfile, replace dist with build


Loading...
Error: No start command could be found - Railway Help Station