-
-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jspm install obs-websocket-js
creates invalid link
#2581
Comments
My environment is a fresh Rails 8.0.0.beta1 app where I tried to pin ❯ ./bin/importmap pin obs-websocket-js
Pinning "obs-websocket-js" to vendor/javascript/obs-websocket-js.js via download from https://ga.jspm.io/npm:[email protected]/dist/json.js
Pinning "crypto" to vendor/javascript/crypto.js via download from https://ga.jspm.io/npm:@jspm/[email protected]/nodelibs/browser/crypto.js
Pinning "crypto-js/" to vendor/javascript/crypto-js/.js via download from https://ga.jspm.io/npm:[email protected]/
/home/arthur/.rvm/gems/ruby-3.3.4/gems/importmap-rails-2.0.2/lib/importmap/packager.rb:84:in `handle_failure_response': Unexpected response code (404) (Importmap::Packager::HTTPError)
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/importmap-rails-2.0.2/lib/importmap/packager.rb:122:in `download_package_file'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/importmap-rails-2.0.2/lib/importmap/packager.rb:57:in `download'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/importmap-rails-2.0.2/lib/importmap/commands.rb:19:in `block in pin'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/importmap-rails-2.0.2/lib/importmap/commands.rb:17:in `each'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/importmap-rails-2.0.2/lib/importmap/commands.rb:17:in `pin'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/thor-1.3.2/lib/thor/base.rb:584:in `start'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/importmap-rails-2.0.2/lib/importmap/commands.rb:141:in `<main>'
from /home/arthur/.rvm/rubies/ruby-3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
from /home/arthur/.rvm/rubies/ruby-3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/arthur/.rvm/gems/ruby-3.3.4/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
from ./bin/importmap:4:in `<main>' And then I tried to open |
There are a few issues like this in this repo, which are examples that work correctly on generator.jspm.io, eg here is this one: The issue specifically is that JSPM relies on packages represented as folders which are chunked optimized packages, whereas this project relies on modules being single files without internal chunks for shared libraries between exports entry points. Until this project migrates to supporting folder-based third-party JS packages over file based, these types of issues will continue to be found. JSPM does offer a download API in https://jspm.org/cdn/api#download, and if anyone is interested in implementing this I'm happy to advise. |
Hi. When running
jspm install obs-websocket-js
it creates this import map:I don't have a lot of experience with JS ecosystem, but I believe this line is incorrect
The name includes
/
at the end, and the link leads to 404. Using--provider unpkg
generated link at least leads to somewhereNot sure where it goes wrong. Initially I was trying to pin
obs-websocket-js
lib in my Rails app. Apologizing if I missed something obvious.The text was updated successfully, but these errors were encountered: