You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
• rails new MyGreatApp --skip-javascript
• rails generate controller Welcome (note: I know this is outside of the normal setup)
• add gems
• bundle exec rails webpacker:install
• rails generate react_on_rails:install
• start the app with foreman start -f Procfile.dev-static (in my app I have put this into a shell script at ./bin/dev)
my suspicion is that there a certain conditions where for whatever reason the pack isn't rebuilt (even though I am examining the output of the webpack dev server and I didn't see those). Somehow, in this state, the frontend is loading the old (wrong) pack. I've seen this too in other cases as well which can lead to a confusing development state. will open a discussion regarding this.
I think there must be something super picky about when the browser hangs onto old (unrebuilt) packs? that's the only explanation I can come up with for this so I am closing and will move into an issue.
Environment
Expected behavior
The HelloWorld component is rendered to the screen when I navigate to http://localhost:3000/hello_world
Actual behavior
No component is rendered and the hello-world-bundle.js cannot be found
also, there is an error message about how these resources cannot be loaded:
GET http://localhost:3000/packs/js/vendors-node_modules_prop-types_index_js-node_modules_react-on-rails_node_package_lib_ReactOn-ee470b.js net::ERR_ABORTED 404 (Not Found)
hello_world:9 GET http://localhost:3000/packs/js/hello-world-bundle.js net::ERR_ABORTED 404 (Not Found)
Small, reproducible repo
https://github.com/jasonfb/ShakapackerH
steps to reproduce:
•
rails new MyGreatApp --skip-javascript
•
rails generate controller Welcome
(note: I know this is outside of the normal setup)• add gems
•
bundle exec rails webpacker:install
•
rails generate react_on_rails:install
• start the app with
foreman start -f Procfile.dev-static
(in my app I have put this into a shell script at./bin/dev
)go to http://localhost:3000/hello_world
The text was updated successfully, but these errors were encountered: