Hotwire Discussion

Importmap-rails 0.9.0 broke stimulus?

After upgrading import map-rails to 0.9.0 I get the following error messages for every single controller:

Failed to autoload controller: pitch Error: Unable to resolve specifier 'controllers/pitch_controller' from http://localhost:3000/assets/stimulus-loading-685d40a0b68f785d3cdbab1c0f3575320497462e335c4a63b8de40a355d883c0.js
    throwUnresolved es-module-shims.min.source.js:2
    importShim es-module-shims.min.source.js:2
    loadController stimulus-loading-685d40a0b68f785d3cdbab1c0f3575320497462e335c4a63b8de40a355d883c0.js:67
    lazyLoadExistingControllers stimulus-loading-685d40a0b68f785d3cdbab1c0f3575320497462e335c4a63b8de40a355d883c0.js:37
    lazyLoadExistingControllers stimulus-loading-685d40a0b68f785d3cdbab1c0f3575320497462e335c4a63b8de40a355d883c0.js:37
    lazyLoadNewControllers stimulus-loading-685d40a0b68f785d3cdbab1c0f3575320497462e335c4a63b8de40a355d883c0.js:51
    lazyLoadNewControllers stimulus-loading-685d40a0b68f785d3cdbab1c0f3575320497462e335c4a63b8de40a355d883c0.js:41
    lazyLoadControllersFrom stimulus-loading-685d40a0b68f785d3cdbab1c0f3575320497462e335c4a63b8de40a355d883c0.js:33
    <anonymous> index-78fbd01474398c3ea1bffd81ebe0dc0af5146c64dfdcbe64a0f4763f9840df28.js:11

Anyone know exactly what the issue is? I guess I have to await a new stimulus/hotwired/turbo gem?

EDIT found the following issue on the subject: Minimized es-module-shims + @hotwired/stimulus-loading in Safari · Issue #74 · rails/importmap-rails · GitHub

Fixed in importmap-rails 0.9.1 :+1:

1 Like