0

[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

2 Answers2

1

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.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
-1

Try to use this:

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

this is for create-react-app application

Shambhu Sahu
  • 342
  • 2
  • 4
  • Welcome to Stack Overflow. Please read [answer]. A link to a solution is great, but [link-only answers are discouraged here](https://meta.stackexchange.com/a/8259/248627) for a variety of reasons. When providing a link, please also include supporting information. How can people apply whatever is at the other end of the link to their problem? Why is this the right solution? What is the root cause of the problem? Etc. – ChrisGPT was on strike Feb 22 '22 at 11:51