Are you using webpacker with this app or esbuild (or similar)? For now, you could try to take the stimulus controller from the code repo and add it into your app. Alternatively, and perhaps my current preferred approach is to use Turbo and a turbo_frame_tag with the src attribute. No javascript needed with this approach.