I'm getting this message on my console and I cannot find a solution:
Failed to register controller: search (controllers/search_controller) TypeError: The 'stimulus' specifier was a simple specifier, but it has not been remapped to anything. Relative module specifiers must start with './', '../', or '/'.
I'm using rails 7.0.2
and importmap.rb
to install my JS.
I tried rerouting the import.map
and redoing the stimulus documentation manual installing and it hadn't worked.
You're importing from
stimulus
in yoursearch_controller.js
. You need to change all references fromstimulus
to@hotwired/stimulus
: