Skip to content

The path is not recognized when using importmap #5

Closed
@brunoprietog

Description

@brunoprietog

Hello!

Using Rails 7 and importmap, I added this gem and ran the installation steps.

However, it only adds the @rails/request.js import in application.js, without adding it to importmap.rb.

I tried to add it manually using any of these options:

pin '@rails/request.js', to: 'rails-requestjs'
pin '@rails/request.js', to: 'request.js'

And I get the following, as appropriate:

Importmap skipped missing path: rails-requestjs
Importmap skipped missing path: request.js

Then, I executed:

bin/importmap pin @rails/request.js

And I got the same result, even though the URL is associated in importmap.rb.

I removed the gem and everything was solved. Now I am using the CDN.

What could be happening?

Something extra I didn't mention is that I'm using propshaft, will it affect anything?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions