Home > Software design >  App not compatible with buildpack, React - Heroku
App not compatible with buildpack, React - Heroku

Time:02-23

[While I trying to push my code it shows these errors.][1]

-----> Building on the Heroku-20 stack -----> Using buildpack: https://github.com/Black-Devil007/Portfolio -----> App not compatible with buildpack: https://github.com/Black-Devil007/Portfolio bash: /tmp/codon/tmp/buildpacks/5c325eed46fe5b82c1951f570d1c1fe84245ed64/bin/detect: No such file or directory More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure ! Push failed

CodePudding user response:

Try to use this:

https://github.com/mars/create-react-app-buildpack.git

this is for create-react-app application

CodePudding user response:

It looks like you've told Heroku to use your own source code as a buildpack.

A buildpack is a very specific thing:

Buildpacks are responsible for transforming deployed code into a slug, which can then be executed on a dyno. Buildpacks are composed of a set of scripts, and depending on the programming language, the scripts will retrieve dependencies, output generated assets or compiled code, and more. This output is assembled into a slug by the slug compiler.

Heroku’s support for Ruby, Python, Java, Clojure, Node.js, Scala, Go and PHP is implemented via a set of open source buildpacks.

It is uncommon to use your own buildpack, and if you do need to make a buildpack it must adhere to a particular interface. Your app does not look like a buildpack.

You could clear the buildpack that you set manually and let Heroku detect the buildpack to use. In this case, it would see the package.json file in your project and use the heroku/nodejs buildpack.

But since it looks like you used react-create-app, the mars/create-react-app buildpack might be a better choice (as Shambhu Sahu pointed out). You can set it manually:

heroku buildpacks:set mars/create-react-app

Finally, redeploy your app.

  • Related