import "controllers" from rails hotwire:install yield when running rails assets:precompile
ModuleNotFoundError: Module not found: Error: Can't resolve 'controllers'
./app/javascript/packs/application.js
`import Rails from "@rails/ujs"
import "@hotwired/turbo-rails"
import * as ActiveStorage from "@rails/activestorage"
import "channels"
I had the exact same problem, it was a missing index.js file within the controllers directory. Running rails webpacker:install:stimulus revealed the issue to me.
import "controllers" from rails hotwire:install yield when running rails assets:precompile
ModuleNotFoundError: Module not found: Error: Can't resolve 'controllers'
./app/javascript/packs/application.js `import Rails from "@rails/ujs" import "@hotwired/turbo-rails" import * as ActiveStorage from "@rails/activestorage" import "channels"
Rails.start() ActiveStorage.start()
require("trix") require("@rails/actiontext") import "controllers"`