How to Fix Heroku Application Error For a Successfully Deployed React App How to Fix Heroku Application Error For a Successfully Deployed React App reactjs reactjs

How to Fix Heroku Application Error For a Successfully Deployed React App


Ok, I've found the issue. The default buildpack when deploying is that of node.js. I needed to use the create-react-app buildpack (as seen below). It works perfectly now.

heroku create $APP_NAME --buildpack mars/create-react-appgit push heroku masterheroku open


If your app is already deployed you can just install the https://github.com/mars/create-react-app-buildpack in heroku settings, if still not working. Try adding a procfile with web: bin/boot. It works for me and hope it works for you.


If you used create-react-app you should add a new object called engines. Inside of the engines object, you specify the versions for npm and node. To do this open up your terminal and type in:

npm -vPress enter

node -vPress enter

{  "name": "portfolio",  "version": "0.1.0",  "private": true,  "engines": {    "npm": "5.7.1",// here put your version    "node": "9.5.0" // here put your version  },... the rest of the file}