Giter Site home page Giter Site logo

Comments (6)

vietqhoang avatar vietqhoang commented on August 15, 2024

I am experiencing the same issue.

/Users/viet/.rvm/gems/ruby-3.2.2/gems/importmap-rails-2.0.1/lib/importmap/npm.rb:89:in `find_latest_version': undefined method `dig' for "version not found: dom":String (NoMethodError)

      latest_version = response.dig('dist-tags', 'latest')
                               ^^^^
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/importmap-rails-2.0.1/lib/importmap/npm.rb:26:in `block in outdated_packages'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/importmap-rails-2.0.1/lib/importmap/npm.rb:17:in `each'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/importmap-rails-2.0.1/lib/importmap/npm.rb:17:in `with_object'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/importmap-rails-2.0.1/lib/importmap/npm.rb:17:in `outdated_packages'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/importmap-rails-2.0.1/lib/importmap/commands.rb:78:in `outdated'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/thor-1.3.0/lib/thor/base.rb:584:in `start'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/importmap-rails-2.0.1/lib/importmap/commands.rb:141:in `<main>'
        from <internal:/Users/viet/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/Users/viet/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /Users/viet/.rvm/gems/ruby-3.2.2/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
        from ./bin/importmap:4:in `<main>'

I've identified the problematic pin which returns the String response:

pin "@floating-ui/utils/dom", to: "@floating-ui--utils--dom.js" # @0.2.1

Removing the line executes the outdated command successfully.

We have had this @floating-ui/utils/dom dependency pinned since last July. It has changed versions many time since and the outdated command never had any issues with it.

from importmap-rails.

ccasabona avatar ccasabona commented on August 15, 2024

from importmap-rails.

vietqhoang avatar vietqhoang commented on August 15, 2024

I submitted #246 which goes over the problem and proposed a first solution.

from importmap-rails.

coder2000 avatar coder2000 commented on August 15, 2024

I get the same issue with the package:

pin "@github/webauthn-json/browser-ponyfill", to: "@github--webauthn-json--browser-ponyfill.js" # @2.1.1

from importmap-rails.

coder2000 avatar coder2000 commented on August 15, 2024

It looks like the npmjs registry doesn't like package names that are more than one folder deep.

from importmap-rails.

drale2k avatar drale2k commented on August 15, 2024

I have the same issue with the following pin pin "cross-fetch/polyfill", to: "cross-fetch--polyfill.js"

I get it when i want to update packages using bin/importmap update

from importmap-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.