Comments (5)
This is fixed in the main branch from GitHub, it was due to a missing index.js file in the controllers folder, and the application.js calling import "controllers"
after running the install script. This is the PR where the error was fixed: #34
a comment here #40 references that webpacker:install:stimulus is going to be removed (I guess it's gone in the 6.0 betas for webpack already).
from stimulus-rails.
from stimulus-rails.
I just ran it again on a fresh app too, and don't run into any problem. Can you post what the rails stimulus:install
script outputs by chance?
Also double check that the gemfile has gem 'stimulus-rails', github: 'hotwired/stimulus-rails', branch: 'main'
and you've bundled/restarted?
I got this output:
± rails stimulus:install
Appending Stimulus setup code to /Users/afomera/Projects/stimulus-test/app/javascript/packs/application.js
append app/javascript/packs/application.js
Creating controllers directory
create app/javascript/controllers
create app/javascript/controllers/hello_controller.js
create app/javascript/controllers/index.js
Installing all Stimulus dependencies
run yarn add stimulus from "."
yarn add v1.22.10
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "webpack-dev-server > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 5 new dependencies.
info Direct dependencies
└─ [email protected]
info All dependencies
├─ @stimulus/[email protected]
├─ @stimulus/[email protected]
├─ @stimulus/[email protected]
├─ @stimulus/[email protected]
└─ [email protected]
✨ Done in 4.43s.
Can follow the commits from a initial rails new here: https://github.com/afomera/trying-stimulus-rails/commits/main
I guess the last question if that all fails is what doesn't work? Unable to compile webpack? What kind of error do you see?
from stimulus-rails.
from stimulus-rails.
@noctivityinc , @dhh published latest 0.2.3
with the fix yesterday .
So I think we can close this one 😄
from stimulus-rails.
Related Issues (20)
- Controllers written in Coffeescript? HOT 1
- why not auto "rails stimulus:manifest:update"
- Failing to register controllers does not bubble the error to handleError HOT 1
- stimulus-rails installation rails - undefined method Stimulus::Rails.application HOT 1
- manifest:update configuration for controller segmentation HOT 1
- Should controller names be registered as camelCase? HOT 2
- rails stimulus:manifest:update replacing our index.js configs HOT 1
- 404 on assets/stimulus-loading.js with config.assets.digest set to false HOT 11
- Mutation Observer not recognising DOM change when using Turbo Streams HOT 2
- Browser Back button is not working for some feature in stimulus HOT 2
- Console error with lazyLoadControllersFrom and external controller HOT 1
- Add typescript support for rails stimulus generator
- Action params not populating HOT 1
- Debugging `Failed to auto-load controller` ... `Unable to resolve specifier` HOT 2
- Error when passing JSON formatted data from rails to stimulus HOT 1
- Stimulus broken in Firefox 115+ with importmap-rails HOT 4
- Is it possible to use controllers stored in a GEM ?
- ActiveModel not working with value to Object HOT 2
- Add stimulus:manifest:update to the tasks description HOT 1
- Error in lib/install/stimulus_with_node.rb
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stimulus-rails.