When using Rails 7, Turbo and Stimulus in combination, you might get the following error in the browser JavaScript console:

TypeError: map.get is not a function

Fix:

-  <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
+  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>

Source: https://gist.github.com/pch/fe276b29ba037bdaeaa525932478ca18