Error: No start command could be found
isabelmoraes
TRIALOP

2 years ago

Error: No start command could be found

9 Replies

2 years ago

Hello,

You need a start script in your package.json


isabelmoraes
TRIALOP

2 years 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?)


2 years ago

Is it a isolated monorepo?


isabelmoraes
TRIALOP

2 years 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",

2 years ago

Please share your repo.


isabelmoraes
TRIALOP

2 years ago

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


2 years ago

Do the frontend and backend share packages or libraries?


isabelmoraes
TRIALOP

2 years ago

they dont


2 years 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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...