Home > Back-end >  Can't import a Stimulus component to my Rails application: Uncaught TypeError: Failed to resolv
Can't import a Stimulus component to my Rails application: Uncaught TypeError: Failed to resolv

Time:12-12

Tried to follow te set up guide for this NestedForm Stimulus component: enter image description here

I'm on Rails 7.0.4.

Appreciate any help, cheers!

CodePudding user response:

If you share a bit more about your rails setup that might help.

Your Rails app might not know about your javascripts... have a look here: https://guides.rubyonrails.org/working_with_javascript_in_rails.html

You will either need to use importmaps (in which scenario you wouldn't need npm), or you use esbuild or webpack (I would not recommend the latter).

  • Related