A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/marcoroth/turbo_power-rails/issues/2 below:

Installation hiccup on Rails 7 with turbo-rails and importmaps · Issue #2 · marcoroth/turbo_power-rails · GitHub

The turbo-rails gem pins thus to the config/importmap.rb file:

pin '@hotwired/turbo-rails', to: 'turbo.min.js', preload: true

When I ran bin/importmap pin turbo_power it did pin a version of @hotwired/turbo but since I didn't want two versions of Turbo, I removed it and received this error:

Uncaught TypeError: Failed to resolve module specifier "@hotwired/turbo". Relative references must start with either "/", "./", or "../".

As a workaround, I just made a "copy" in config/importmap.rb like so:

pin '@hotwired/turbo-rails', to: 'turbo.min.js', preload: true
+pin @hotwired/turbo', to: 'turbo.min.js', preload: true

After that no problems and I've already implemented a .set_attribute() stream. 🚀

Thanks for this great gem and NPM package.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4