Issues deploying to heroku path="/" path="/favicon.ico" Issues deploying to heroku path="/" path="/favicon.ico" heroku heroku

Issues deploying to heroku path="/" path="/favicon.ico"


https://blog.heroku.com/deploying-react-with-zero-configuration

Hey did you go through this? I think if you're using the Heroku CLI you need to add the -b tag during deployment to add the custom build pack.

Also it's similar to this question React app crashes on Heroku after using npm install

Edit: So I tried to deploy a sample react app to heroku and came up with a similar issue. The issue is that when you use Create-react-app to generate the react app it automatically adds build configurations. Now heroku builds the app and tries to serve the built app. Hence it will not be able to route the application as expected. To solve this you will have to either use a build pack along with the project that tells heroku how to serve the files or you will have to separate the backend and the frontend (frontend-react and backend express server using node.).

Reference - https://github.com/mars/create-react-app-buildpack#usagehttps://github.com/mars/heroku-cra-node

Edit 2: added some quotes as suggested by @IvanAracki

Thanks to the zero-config foundation of create-react-app, the idea of zero-config deployment seemed within reach. Since these new apps all share a common, implicit architecture, the build process can be automated and then served with intelligent defaults. So, we created this community buildpack to experiment with no-configuration deployment to Heroku.

npm install -g create-react-appcreate-react-app my-appcd my-appgit initheroku create -b https://github.com/mars/create-react-app-buildpack.gitgit add .git commit -m "react-create-app on Heroku"git push heroku masterheroku open

Try it yourself using the buildpack docs.