Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The asset "actioncable.esm.js" is not present in the asset pipeline. #2

Closed
leehericks opened this issue Aug 13, 2021 · 6 comments
Closed

Comments

@leehericks
Copy link
Contributor

Thank you so much for this gem and really shaping up Hotwire!

I'm upgrading an asset pipeline only Hotwire app on Rails 6.1.4.

I assume these will be available automatically in Rails 7,
but how should we go about getting the three javascript files added to assets.rb by the installer?

@leehericks
Copy link
Contributor Author

Clearly and understandably there is currently a name mismatch as looking in the rails source code yields action_cable.js, but even correcting the name throws up an error about the assets not being precompiled, and running rails assets:precompile also doesn’t link these files.

@dhh
Copy link
Member

dhh commented Aug 13, 2021

Yeah, this relies on a ESM compilation that's only present in rails/main at the moment. Will look at something to make it compatible with released rails.

@dhh
Copy link
Member

dhh commented Aug 13, 2021

I'd say actually that the easiest way to proceed if you want to play with this already, though, is to get on rails/main. Expect a fair amount of churn until all this settles!

@leehericks
Copy link
Contributor Author

I may have jumped the gun as this is a semi-production app with organization-wide use from October but I have struggled incredibly trying to get ActiveStorage direct upload working via the rails guide instructions, possibly because I'm missing UJS? But the activestorage.js looks independent and feature complete. Was hoping this new JavaScript architecture might fix my problems with that regard.

@dhh
Copy link
Member

dhh commented Aug 13, 2021

There are plenty of production apps running off rails/main, but yeah, probably wouldn't use that approach as a way to route around a bug or misconfiguration with AS 😄. Especially since there's likely to be considerable churn to how the importmap approach works before it's ready for shipping.

@dhh
Copy link
Member

dhh commented Aug 17, 2021

For now, we skip missing pins instead of dying.

@dhh dhh closed this as completed Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants