app/javascript/packs/hello.js
<%= javascript_pack_tag 'hello' %>
works fine, but
app/javascript/packs/welcome/hello.js
<%= javascript_pack_tag 'welcome/hello' %>
produces:
Webpacker::FileLoader::NotFoundError in Welcome#index
Can't find welcome/hello.js in .../public/packs/manifest.json. Is webpack still compiling?
Even after restarting webpack-dev-server
@dino-k-29 Did you re-install webpacker after update? bundle exec rails webpacker:install - you will need to replace shared.js with the new one or copy the new changes.
Hi @gauravtiwari yes, I ran bundle exec rails webpacker:install as well as bundle exec rails webpacker:install:vue earlier and once again just now. Are there some additional steps to take regarding shared.js?
@dino-k-29 Did you run bundle update webpacker before that?
@gauravtiwari Just ran bundle update webpacker (set gem 'web-console', '3.3.0' in the process to avoid some kind of conflict with actionpack), then followed all the steps mentioned previously, but the same issue persists unfortunately
@dino-k-29 Right strange. One last thing, in your Gemfile webpacker is pinned to master right?
It wasn't, updated the Gemfile to gem 'webpacker', github: "rails/webpacker" and it's working now!
Must've glossed over that suggestion in the readme, assuming I was on the latest version anyway
Thank you for your help @gauravtiwari
Document this in README/Guide - #372
Most helpful comment
It wasn't, updated the Gemfile to
gem 'webpacker', github: "rails/webpacker"and it's working now!Must've glossed over that suggestion in the readme, assuming I was on the latest version anyway
Thank you for your help @gauravtiwari