gjaldon / heroku-buildpack-phoenix-static

A Heroku buildpack for building Phoenix's static assets
MIT License
229 stars 224 forks source link

Yarn error: "Command "deploy" not found." #86

Closed jbrowning closed 5 years ago

jbrowning commented 5 years ago

We're currently on Phoenix 1.4 + brunch (webpack migration is currently optional) and the changes from #83 cause this error on deploy.

jbrowning commented 5 years ago

The root issue here of course is that older default Phoenix package.json files did not contain a deploy script. We're old school. :)

gjaldon commented 5 years ago

Maybe we can do a check to see if brunch or webpack is used and then run the corresponding script? For the meantime, you can add a custom compile file to override the default compile commands. You can refer here https://github.com/gjaldon/heroku-buildpack-phoenix-static#compile

behe commented 5 years ago

Maybe just document what to put in compile if it's missing in the installation instructions?

jaimeiniesta commented 5 years ago

Same here, on a phoenix 1.4 app that still uses brunch:

remote: sent 60 bytes  received 19 bytes  158.00 bytes/sec
remote: total size is 0  speedup is 0.00
remote:        Running default compile
remote:        npm ERR! missing script: deploy
remote:
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /app/.npm/_logs/2019-03-08T15_00_27_106Z-debug.log
remote:  !     Push rejected, failed to compile Phoenix app.
remote:
remote:  !     Push failed
gjaldon commented 5 years ago

The README has been updated to explain that default compile has been changed and includes what needs to be put in compile https://github.com/gjaldon/heroku-buildpack-phoenix-static#faq

Let me know if this is good enough or needs some changes.

jbrowning commented 5 years ago

Good enough for me.

Many thanks.