I recently spent an excessive amount of time debugging a Webpacker issue on Heroku’s Continuous Integration server (a server that you can associate with a pipeline). Ultimately, there was a shockingly simple solution, so here it is, and I hope this helps save someone else a few hours in the future.
Webpacker can’t find application in /packs-test/manifest.json
Once those locally passing tests were committed to the repo, they began failing on Heroku with the following error.
Searching through all the usual forums didn’t yield any significant results. Merely the typical, “it’s fixed now, closing issue.”
However, I was able to dig through the continuous integration server logs and noticed that the test-run setup logs didn’t state the construction of the asset pipeline. On a pure whim from that hunch, I added the following
And it did the trick!
I’m still digging into why I needed to tell Heroku to build the asset pipeline as I haven’t had to do that on any other Heroku application and/or pipeline in the past (as recent as this summer and fall of 2019). My hunch is that it is a new behavior intersecting between Rails6, Webpacker, and changes to Heroku. I’ll continue to research and update once I know why this changed.