DEV Community

Discussion on: Causes of Heroku H10-App Crashed Error And How To Solve Them

Collapse
 
urosran profile image
Uros Randelovic • Edited

Hi Haim,

If you run yarn start/npm start now it points to 'serve -s build' instead of 'react-scripts start'.

Make sure you've added below:

"dev": "react-scripts start",
"start": "serve -s build",

and to run your app locally do npm run dev not npm start

Thread Thread
 
haimbuchbut profile image
Haim Buchbut

Thanks. It didn't work with "npm dev" (I got that "dev" is invalid command), but it did work with "npm run dev".

Thread Thread
 
lawrence_eagles profile image
Lawrence Eagles • Edited

I am glad to hear this worked for you.
Just a side note:
commands like npm start can work directly because they are default commands from npm but custom commands like dev set by the user would only work with the run command. npm run dev. I hope this clears things up.