Webpacker: Webpack compiling all assets - 404 returned when loading them

Created on 27 Oct 2017  路  3Comments  路  Source: rails/webpacker

Hey there!

I'm deploying on Heroku a Rails 5 app using the webpack pipeline to load Vue.

When I deploy onto Heroku and the assets:precompile starts I see that webpack does precompile everything:

image

When the page tries to load it, however, I get a 404 error:

image

And in the Heroku logs I see this line:

2017-10-19T10:04:51.947282+00:00 heroku[router]: at=info method=GET path="/packs/main-49ef6f7f11bf1482d113.js" host=lacerba-beta.herokuapp.com request_id=fce4e051-2880-4566-8e66-5cd3369a819f fwd="125.227.151.206" dyno=web.1 connect=0ms service=72ms status=404 bytes=1744 protocol=https

All 3 comments

Do the digests in the browser match those found in packs/manifest.json and/or the ones found in public/packs?

@rossta Thank you! Your hint got us to fix the issue! For some reason, public/packs was in the .gitignore and thus it was not getting pushed to Heroku!

This happened to me because I had webpack dev server running on a different project

Was this page helpful?
0 / 5 - 0 ratings

Related issues

itay-grudev picture itay-grudev  路  3Comments

johan-smits picture johan-smits  路  3Comments

suhomlineugene picture suhomlineugene  路  3Comments

pioz picture pioz  路  3Comments

ytbryan picture ytbryan  路  3Comments