heroku / heroku-buildpack-emberjs

**This buildpack is deprecated!** Please use the official Node.js buildpack combined with the static or nginx buildpack instead.
71 stars 28 forks source link

Failed to detect set buildpack - non-root build #21

Closed woosungchu closed 7 years ago

woosungchu commented 7 years ago

While I tried to add buildpack to my heroku project, I stuck on 'Falied to detect set buildpack' error. After few googling, I guess it happened because package.json is not in the root directory. Then I tried this

"postinstall": "cd mindmap-web && ember build"

but failed

My app is divided front-end and back-end part with two directory in root.

backend/
    python-app/
    config/
frontend/
    ember-app/
    config/

and how to detour this problem??

Build log

    -----> Python app detected
     $ pip install -r requirements.txt
     $ python mindmap/manage.py collectstatic --noinput
       79 static files copied to '/tmp/build_e0145313c15dd2c7e8fba9521d0bec22/woosungchu-mindmap-bb9192d/mindmap/static', 79 post-processed.
-----> Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
 !     Push failed
woosungchu commented 7 years ago

remote: -----> Failed to detect set buildpack https://codon-buildpacks.s3.amazon aws.com/buildpacks/heroku/emberjs.tgz remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-fa ilure

Though I added package.json file to root, it doesn't work

simonc commented 7 years ago

Hello. We're facing the same issue with a standard EmberJs app. The detect step is failing without providing any reason.

I forked the buildpack and added some debug and I can attest the package.json file is present and does contain the right thing.

woosungchu commented 7 years ago

@simonc Thank you for reply. I have tested whether heroku detect ember app properly or not, but it still doesn't work. Does ' I can attest the package.json file is present' mean that you fixed it but not merged yet?

simonc commented 7 years ago

@woosungchu No. Sorry my message wasn't clear. My app "does contain the package.json" when the buildpack is called but it is not detected. Or something else fails but there is no details about what's going wrong.

I have another app that deploys correctly on the dyno so I will investigate why the other app doesn't tomorrow and keep you posted if I find something :)

Dhaulagiri commented 7 years ago

@simonc can you see if you have any duplicate dependencies in the package.json for the app that doesn't work?

simonc commented 7 years ago

@Dhaulagiri OMG you're right! "ember-bootstrap" was appearing twice and removing the duplication made the detection work 😮

I don't know what part of the detection fails because of it but it's all but explicit. Do you think there's a way to print an error message telling the user what's wrong? ☺️

Dhaulagiri commented 7 years ago

@simonc that's good to hear. I know of at least one other person who was having the same issue. I'll see if we can find some time to smooth this out.

woosungchu commented 7 years ago

In my case unfortunately, there is no duplicate dependencies.. :disappointed:

hone commented 7 years ago

@woosungchu we don't support mono-repo style deployment in this buildpack. You might want to check out this buildpack which tries to solve the monorepo on Heroku. I have not tried it myself, so I can't make any promises.