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

0.4.0 (app/javascript/application.js does not appear to exist) for Rails without importmap #71

Closed
kjellberg opened this issue Sep 4, 2021 · 1 comment

Comments

@kjellberg
Copy link

kjellberg commented Sep 4, 2021

From version 0.4.0, stimulus:install tries to append import "./controllers" in app/javascript/application.js instead of app/javascript/packs/application.js when using the default install of Rails (with webpacker). This also affects hotwire-rails since it's using the latest version of Stimulus.

Rails version: 6.1.4.1

$ rails new myapp
$ cd myapp
$ bundle add stimulus-rails
$ rails stimulus:install

Create controllers directory
      create  app/javascript/controllers
      create  app/javascript/controllers/index.js
      create  app/javascript/controllers/hello_controller.js
Import Stimulus controllers
rails aborted!
Thor::Error: The file /..../myapp/app/javascript/application.js does not appear to exist
@kjellberg kjellberg changed the title 0.4.0 breaks installs for Rails without importmap 0.4.0 breaks install (app/javascript/application.js does not appear to exist) for Rails without importmap Sep 4, 2021
@kjellberg kjellberg changed the title 0.4.0 breaks install (app/javascript/application.js does not appear to exist) for Rails without importmap 0.4.0 (app/javascript/application.js does not appear to exist) for Rails without importmap Sep 4, 2021
@dhh
Copy link
Member

dhh commented Sep 4, 2021

Fixed in 0.4.2. Thanks!

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

No branches or pull requests

2 participants