I’ve spun up a new rails project with the following command:
rails new <package-name> -d postgresql --skip-spring --skip-test --webpack=react
Following this, I created my database, added
application.html.erb and generated a homepage.
I then ran:
rails s # tab 1 bin/webpack-dev-server # tab 2
This all works fine and I can see “Hello World!” at localhost:3000.
However, when I try to push to Heroku, the build fails at
webpack binstubs not found.. I can confirm that
bin/webpack does exist, doing
rails webpack:install:react does nothing.
I’ve followed the instructions at webpacker/deployment.md at master · rails/webpacker · GitHub to no avail, still getting the exact same error.
I’ve even tried setting
compile: true in
config/webpacker.yml, in the production section. Nothing.
This seems odd as this is a new project with nothing special in it; I’m confused as to why it cannot seem to find the declaration of
bin/webpack. It is not in my
Any help would be great.