You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using bin/importmap pin rails_admin --download, an error is thrown. See below for full stack trace.
Reproduction steps
Steps to reproduce the issue seen.
rails new rails_admin_repo -j importmaps
cd rails_admin_repo
bundle add rails_admin
bin/importmap pin rails_admin --download
Expected behavior
I expect the jquery-ui files to each be downloaded and saved to the vendor directory.
Additional context
rails version: 7.0.4.3
rails_admin version: 3.1.2
rails_admin npm package version: 3.1.2
full stack trace (if there's an exception)
Pinning "rails_admin" to vendor/javascript/rails_admin.js via download from https://ga.jspm.io/npm:rails_admin@3.1.2/src/rails_admin/base.js
Pinning "@hotwired/turbo" to vendor/javascript/@hotwired/turbo.js via download from https://ga.jspm.io/npm:@hotwired/turbo@7.3.0/dist/turbo.es2017-esm.js
Pinning "@hotwired/turbo-rails" to vendor/javascript/@hotwired/turbo-rails.js via download from https://ga.jspm.io/npm:@hotwired/turbo-rails@7.3.0/app/javascript/turbo/index.js
Pinning "@popperjs/core" to vendor/javascript/@popperjs/core.js via download from https://ga.jspm.io/npm:@popperjs/core@2.11.7/lib/index.js
Pinning "@rails/actioncable/src" to vendor/javascript/@rails/actioncable/src.js via download from https://ga.jspm.io/npm:@rails/actioncable@7.0.4/src/index.js
Pinning "@rails/ujs" to vendor/javascript/@rails/ujs.js via download from https://ga.jspm.io/npm:@rails/ujs@6.1.7/lib/assets/compiled/rails-ujs.js
Pinning "bootstrap" to vendor/javascript/bootstrap.js via download from https://ga.jspm.io/npm:bootstrap@5.2.3/dist/js/bootstrap.esm.js
Pinning "flatpickr" to vendor/javascript/flatpickr.js via download from https://ga.jspm.io/npm:flatpickr@4.6.13/dist/esm/index.js
Pinning "jquery" to vendor/javascript/jquery.js via download from https://ga.jspm.io/npm:jquery@3.7.0/dist/jquery.js
Pinning "jquery-ui/ui/" to vendor/javascript/jquery-ui/ui/.js via download from https://ga.jspm.io/npm:jquery-ui@1.13.2/ui/
/$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/importmap-rails-1.1.5/lib/importmap/packager.rb:81:in `handle_failure_response': Unexpected response code (404) (Importmap::Packager::HTTPError)
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/importmap-rails-1.1.5/lib/importmap/packager.rb:119:in `download_package_file'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/importmap-rails-1.1.5/lib/importmap/packager.rb:58:in `download'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/importmap-rails-1.1.5/lib/importmap/commands.rb:21:in `block in pin'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/importmap-rails-1.1.5/lib/importmap/commands.rb:18:in `each'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/importmap-rails-1.1.5/lib/importmap/commands.rb:18:in `pin'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/importmap-rails-1.1.5/lib/importmap/commands.rb:142:in `<main>'
from <internal:/$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /$HOME/.asdf/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:38:in `require' from bin/importmap:4:in `<main>'
Add any other context about the problem here.
My understanding is that importmap-rails makes a request to jspm.io for the import maps for the library. The service returns an invalid(?) importmap for jquery-ui
"jquery-ui/ui/"=>"https://ga.jspm.io/npm:jquery-ui@1.13.2/ui/" this line cannot be resolved. I'm guessing each of the jquery-ui library components should be returned in this json?
Describe the bug
When using
bin/importmap pin rails_admin --download
, an error is thrown. See below for full stack trace.Reproduction steps
Steps to reproduce the issue seen.
rails new rails_admin_repo -j importmaps
cd rails_admin_repo
bundle add rails_admin
bin/importmap pin rails_admin --download
Expected behavior
I expect the jquery-ui files to each be downloaded and saved to the vendor directory.
Additional context
rails
version: 7.0.4.3rails_admin
version: 3.1.2rails_admin
npm package version: 3.1.2Add any other context about the problem here.
My understanding is that
importmap-rails
makes a request to jspm.io for the import maps for the library. The service returns an invalid(?) importmap forjquery-ui
"jquery-ui/ui/"=>"https://ga.jspm.io/npm:jquery-ui@1.13.2/ui/"
this line cannot be resolved. I'm guessing each of the jquery-ui library components should be returned in this json?This is where importmaps is attempting to download the "file" https://github.com/rails/importmap-rails/blob/main/lib/importmap/packager.rb#LL57C23-L57C23
Is it that rails_admin could be packaged in such a way that the import maps returned are downloadable?
The text was updated successfully, but these errors were encountered: