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 running install generator of the gem on the newest rails with importmap I've got an exception
After debugging I found that importmap calling api.jspm.io/generate and the site returns Error: No provider named "jspm" has been defined.
I don't know much about js generation, is it temporary error or we need to fix something?
Reproduction steps
create new app rails new example-app
add gem rails_admin and run bundle install
run bin/rails g rails_admin:install
Expected behavior
should install without errors
Additional context
rails version: 7.0.4.3
rails_admin version: 3.1.1
rails_admin npm package version: 3.1.1
full stack trace (if there's an exception)
/usr/local/bundle/gems/rails_admin-3.1.1/lib/generators/rails_admin/importmap_formatter.rb:17:in `format': undefined method `[]' for nil:NilClass (NoMethodError)
imports['@popperjs/core'].gsub!('lib/index.js', 'dist/esm/popper.js')
^^^^^^^^^^^^^^^^^^
from /usr/local/bundle/gems/rails_admin-3.1.1/lib/generators/rails_admin/install_generator.rb:88:in `configure_for_importmap'
from /usr/local/bundle/gems/rails_admin-3.1.1/lib/generators/rails_admin/install_generator.rb:33:in `install'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `block in invoke_all'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `each'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `map'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `invoke_all'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/group.rb:232:in `dispatch'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /usr/local/bundle/gems/railties-7.0.4.2/lib/rails/generators.rb:263:in `invoke'
from /usr/local/bundle/gems/railties-7.0.4.2/lib/rails/commands/generate/generate_command.rb:26:in `perform'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /usr/local/bundle/gems/railties-7.0.4.2/lib/rails/command/base.rb:87:in `perform'
from /usr/local/bundle/gems/railties-7.0.4.2/lib/rails/command.rb:48:in `invoke'
from /usr/local/bundle/gems/railties-7.0.4.2/lib/rails/commands.rb:18:in `<main>'
from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /usr/local/bundle/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from bin/rails:6:in `<main>'
The text was updated successfully, but these errors were encountered:
The cause was a change on the jspm side. jspm/generator#235
Though the fix is being in place on their side, I thought it's good to place a workaround on our side since it's a tiny change. Now fixed in the master.
Describe the bug
When running install generator of the gem on the newest rails with importmap I've got an exception
After debugging I found that importmap calling
api.jspm.io/generate
and the site returnsError: No provider named "jspm" has been defined.
I don't know much about js generation, is it temporary error or we need to fix something?
Reproduction steps
create new app
rails new example-app
add gem rails_admin and run bundle install
run
bin/rails g rails_admin:install
Expected behavior
should install without errors
Additional context
rails
version: 7.0.4.3rails_admin
version: 3.1.1rails_admin
npm package version: 3.1.1The text was updated successfully, but these errors were encountered: