Posts

Showing posts from December, 2019

Deploy Reatjs app on Heroku

1. React JS app npm install -g create-react-app create-react-app my-app cd my-app git init heroku create -b https://github.com/mars/create-react-app-buildpack.git git add . git commit -m "react-create-app on Heroku" git push heroku master heroku open OR if you already have app created then add  mars/create-react-app then set heroku buildpacks:set mars/create-react-app 2. If following error coming then set bundle path:  ls: cannot access '/app/build/static/js/*.js': No such file or directory 2019-12-23T07:49:22.901124+00:00 app[web.1]: Error injecting runtime env: bundle not found '/app/build/static/js/*.js'. See: https://github.com/mars/create-react-app-buildpack/blob/master/README.md#user-content-custom-bundle-location heroku config:set JS_RUNTIME_TARGET_BUNDLE='/app/dist/*.js' Make sure your bundle into directory /app/dist OR if you have your bundle into other directory then set other directory pa