DEV Community


Discussion on: Deploy Your React App To Heroku

niinpatel profile image
Nitin Patel

You forgot one important step I beleive.

Before deploying the app go to:
Heroku dashboard > settings > buildpacks > add buildpacks and then add

Or, in command line you can do

heroku buildpacks:set

If you don't do this step, heroku will deploy the development build (which is slow) of your react app instead of the optimized production build.

sameerkatija profile image
Sameer Katija

Well, ThankYou Nitin. I wasn't able to upload, but your comment worked Thanks buddy, <3

nobu0605 profile image
Nobu • Edited

I really appreciate you!
 Finally, I deployed my app to Heroku correctly.

Before deploying, I spent almost 5 hours.

kingeclipse profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct

Guess you never heard of Billie Eilish well then, check this out

keerthilingu profile image

Yes, build pack is required for create-react-app template (static sites).

In Heroku dashboard, under settings> buildpack - I changed from node build pack to and then react static web page started working (or buildpack can be set via Heroku CLI also).

If your app is involving, node backend , then checkout