Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

Output a clearer error message for detect failures #186

Open
edmorley opened this issue Jan 27, 2021 · 0 comments
Open

Output a clearer error message for detect failures #186

edmorley opened this issue Jan 27, 2021 · 0 comments

Comments

@edmorley
Copy link

Currently if bin/detect for this buildpack fails to find a package.json, the build outputs shows:

$ mkdir -p testapp-cra && cd $_ && git init && h create
$ h buildpacks:add mars/create-react-app
$ touch foo
$ git add -A && git commit -m '.' && git push heroku main
...
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/mars/create-react-app.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed

If bin/detect were to instead output a package.json not found in app source type error message to stderr (must be stderr or the build system ignores it), then that would be shown in the output instead.

Examples of what other buildpacks output:
https://github.com/heroku/heroku-buildpack-nodejs/blob/master/bin/detect
https://github.com/heroku/heroku-buildpack-php/blob/main/bin/detect

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant