-
Notifications
You must be signed in to change notification settings - Fork 97
Hook into asset:pipeline silently fails on heroku #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Cc @schneems |
You need to add the nodejs buildpack to the heroku application
El El dom, 26 sep. 2021 a la(s) 08:43, David Heinemeier Hansson <
***@***.***> escribió:
Cc @schneems <https://github.com/schneems>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFOIO3NOJTJAOP32OY7SEDUD4BOVANCNFSM5EYWIHJQ>
.
--
Bruno Bonamin.
|
Hi @bbonamin, I know, that’s not the point of my issue, it’s that when yarn is not available the |
Oh ok, that makes sense! This is bleeding edge so some rough edges would be
expected, especially as the heroku buildpack might not be prepared for this
new gem, so it's possible this should probably be filed as an issue the
heroku-buildpack-ruby. https://github.com/heroku/heroku-buildpack-ruby
El lun, 27 sept 2021 a las 5:39, Pete Hawkins ***@***.***>)
escribió:
… Hi @bbonamin <https://github.com/bbonamin>, I know, that’s not the point
of my issue, it’s that when yarn is not available the asset:precompile
task continues to run and doesn’t error, despite the fact it doesn't build
your bundles, and therefore you get a successful deploy, but a broken
application.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFOIO6QVACPOXMR6TGNY2LUEAUS5ANCNFSM5EYWIHJQ>
.
--
Bruno Bonamin.
|
I'd be happy to see a PR where assets:precompile explodes if it can't run properly 👍 |
I’ll see what I can do! |
I'm tracking this issue here heroku/heroku-buildpack-ruby#1202 In the short term workaround you need to:
That will install node and yarn for your app. |
Uh oh!
There was an error while loading. Please reload this page.
Using this with a fresh Rails 6.1 app, when deploying to Heroku using the default 'heroku/ruby' build pack, the asset pipeline hooks fail silently stating:
The app continues to deploy and then the follow 500 error happens when you try to load pages.
SSH’ing into the dyno and there are no files in the
app/assets/builds
directory.All running fine using
bin/dev
locally. I’m not sure how complex it is, but it would be nice if it could fail hard when yarn is not installed.To fix the issue adding
heroku/nodejs
as the primary buildpack makes it all work.I know this is a heroku issue, in terms of making it work out of the box like it did with webpacker, but I think failing loudly might help diagnose the issue easier.
P.s. This gem is awesome! So much easier to work with than webpack and along with the jsbundling-rails + esbuild its so fast. Keep up the great work!!!!
Full logs of the failing heroku build:
The text was updated successfully, but these errors were encountered: