2
votes

I want to deploy a react app on Heroku.

I run npm run build which creates a productionized version into the build_webpack folder. I do a git add . on this folder and try to submit but Heroku doesn't recognize the buildpack.

remote: Building source: remote: remote: -----> App not compatible with buildpack: https://github.com/ddollar/heroku-buildpack-multi remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure remote: remote: ! Push failed remote: Verifying deploy...

1

1 Answers

-1
votes

if you want to deploy your code to heroku , you should use this command first you need a free heroku account next you should install heroku on your machine and after that login using this command

heroku login

after you loged in , cd to your project dir and enter this command

heroku create $APP_NAME $BRANCH:MASTER --buildpack mars/create-react-app

if you are on branch master you don't have to enter $BRANCH: