-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Assets Precompile breaks Capistrano deploy #531
Comments
@schuylr Could you please downgrade webpack to 2.x stable version and deploy again? Seems like some of the dependencies are yet to be upgraded to 3.0.0 |
That fixed some dependencies.
Warnings shouldn't be returning non-zero codes :( |
@schuylr Yes, this is strange - it shouldn't fail for warnings. I will investigate and post something here. |
So I ssh'ed directly into the server and ran the
So I have to fix something with my code (maybe). However, this should be visible from Capistrano's side, and I never saw this while deploying. |
Looks like it's es6 code from |
@gauravtiwari No, it's coming from
Why doesn't Babel transpile the ES6 code into something usable for Uglify...? |
I tried using
|
Oh that should be true to compile everything to es5, but seems one of the packages you are using got es6 syntax. |
Could you take a look at this issue please? #395 - particularly this comment #395 (comment) |
See my latest attempt with that issue and comments in mind:
|
Okay so I followed the Would you mind leaving this issue open? Precompile failures should be verbose in the context of Capistrano/Ansible/Heroku deploys and shouldn't be silent as it currently stands. |
@schuylr You don't get error messages like this when you deploy - |
@gauravtiwari I do not - the pastes you see above are the only things I see from Capistrano when deploying with errors. Are you showing me a Capistrano log? |
No this is Heroku actually. Probably something to do with capistrano setup? |
If a precompile fails from the old |
Face with the same issue. My workaround:
If you still got an error like
It might means that some dependencies was not properly resolved like you import something wrong to figure out what really happens. execute on server
You will see full log. I think in case of capistrano task it will be better to output all info from webpack, because it takes time from me to figure out that issue was not with packages but with my wrong import (on dev server I've not this issue). Hope it helps to someone. |
This is hopefully a temporary fix, as the stock rails/webpacker config using Uglifyjs is not able to compile code that is ES6. Relevant issues: rails/webpacker#395 (comment) rails/webpacker#531
My deploy precompile seems to work fine however it looks like deprecation/dependency warnings are throwing non-zero exit codes, which makes Capistrano think that the precompile failed:
Is there something I'm missing?
The text was updated successfully, but these errors were encountered: