Reputation: 370
Ever since I upgraded to rails 6 and installed webpacker I've been getting this message in production:
2019-10-06T10:57:14.221369+00:00 app[web.1]: E, [2019-10-06T10:57:14.221154 #4] ERROR -- : [5e6a4fed-5c09-44fa-a840-24badc9f6a99] [Webpacker] Compilation failed:
2019-10-06T10:57:14.221389+00:00 app[web.1]: error Command "webpack" not found.
There are no further details and it appears that all my js is working fine. Any ideas?
Upvotes: 0
Views: 1503
Reputation: 7070
Try
heroku buildpacks:add --index 1 heroku/nodejs
heroku buildpacks:add --index 2 heroku/ruby
Per
https://github.com/rails/webpacker/issues/512#issuecomment-309268946
Also,
Yarn should be included on heroku by default (per this article) if you have the webpacker
gem in the Gemfile.
Upvotes: 1