Rails 6 Assets precompile fails on heroku

Viewed 173

I cannot figure out what is going wrong and have almost seen every SO post regarding this. Deploying Rails 6 app on heroku fails, below is what i get in the build log:

Compilation failed: ModuleNotFoundError: Module not found: Error: Can't resolve 'module' in '/tmp/build_3cfec286_/node_modules/webpack/lib' at /tmp/build_3cfec286_/node_modules/webpack/lib/Compilation.js:925:10 at /tmp/build_3cfec286_/node_modules/webpack/lib/NormalModuleFactory.js:401:22 at /tmp/build_3cfec286_/node_modules/webpack/lib/NormalModuleFactory.js:130:21

and a few dozen more lines.

Pointers to few files that may help resolve this issue:

  1. github repo

  2. config/webpacker.yml

  3. config/webpack/environment.js

  4. package.json

  5. Rakefile

  6. babel.config.js

I can provide more information if needed and would really appreciate any help.

1 Answers
Related