You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've added these lines in app/webpacker/controllers/index.js as per the instructions:
import NestedForm from 'stimulus-rails-nested-form';
...
application.register('nested-form', NestedForm);
But getting this compilation error and don't know how to fix it:
./node_modules/stimulus-rails-nested-form/dist/stimulus-rails-nested-form.mjs 42:2-3
Can't import the named export 'Controller' from non EcmaScript module (only default export is available)
Environment
@hotwired/stimulus@^3.2.2
webpack@^4.46.0
rails (7.0.8)
node-version 17.9.1 (Edit: I note that this component uses Node 18)
The text was updated successfully, but these errors were encountered:
This guy had this exactly same problem
Check if the module is indeed there as per this question
It seems to have to import like this:
import NestedForm from 'stimulus-rails-nested-form/dist/stimulus-rails-nested-form.umd.js'
I've added these lines in
app/webpacker/controllers/index.js
as per the instructions:But getting this compilation error and don't know how to fix it:
Environment
@hotwired/stimulus@^3.2.2
webpack@^4.46.0
rails (7.0.8)
node-version 17.9.1 (Edit: I note that this component uses Node 18)
The text was updated successfully, but these errors were encountered: