hotwired / hotwire-rails

Use Hotwire in your Ruby on Rails app
https://hotwired.dev
MIT License
971 stars 27 forks source link

File unchanged! The supplied flag value not found! app/javascript/packs/application.js #23

Closed jakehockey10 closed 3 years ago

jakehockey10 commented 3 years ago

I don't know what this issue means or how to solve it. I haven't been able to find anything on the web about it except that for a select few people who got around it, just uninstalled and re-installed until it worked. And that was for libraries like stimulus-reflex. Not hotwire specifically. What is going on here? Can I get some help getting pointed in the right direction on how to diagnose this?

leemcalilly commented 3 years ago

Having this same issue. On an m1 Mac. Not sure if that is related.

arusa commented 3 years ago

Seems to be the same problem I had too. The installer currently only works for rails projects that started with 6.1 or where application.js was manually adapted to the new style after upgrading to 6.1

https://github.com/hotwired/turbo-rails/issues/148#issuecomment-801354993

import Rails from "@rails/ujs"
import "@hotwired/turbo-rails"
import * as ActiveStorage from "@rails/activestorage"

Rails.start()
ActiveStorage.start()
dhh commented 3 years ago

Installer setup has changed for Turbo, but yes, assuming ESM style.