jonas PRO said almost 3 years ago on Autocomplete with StimulusJS :
I have a legacy project in Rails 6.1 where I use assets pipeline and yarn. Tried webpacker but got in to trouble with a lot of old jquery which I am trying to replace with new stimulus code. Hence the need for stimulus-autocomplete.

I can't get the stimulus-autocomplete to load, I get:
Failed to autoload controller: autocomplete - Error: Unable to resolve specifier 'autocomplete_controller' from http://localhost:3000/dev-assets/stimulus/loaders/autoloader.debug.js

I have
Rails.application.config.assets.paths << Rails.root.join('node_modules')
in assets.rb

What needs to be done in order to import controllers from node_modules into stimulus using assets_pipeline?