React app runs locally, crashes when on Heroku error code=H10 React app runs locally, crashes when on Heroku error code=H10 heroku heroku

React app runs locally, crashes when on Heroku error code=H10


I had the same problem, but the solution above did not work for my react app in Heroku. I have updated the build pack to create-react-app, and it worked for me.

heroku buildpacks:set mars/create-react-app


Just npm i serve to install serve then or you could use yarn instead of npm

You can change your scripts in package.json file, it seemed to be caused by update by react.

"scripts": {"dev": "react-scripts start","start": "serve -s build","build": "react-scripts build","heroku-postbuild": "npm run build"}

Hope it fixes your problem.


I face the same problem, it has worked for me.

add "serve" to application.

example:npm add serve or yarn add serve

after change scripts in package.json

"scripts": {  "dev": "react-scripts start",  "start": "serve -s build",  "build": "react-scripts build",  "heroku-postbuild": "npm run build"}