Skip to content

Missing modules when deploying to another folder/instance #281

@emmanuelcohenlaroque

Description

@emmanuelcohenlaroque

I wonder how a config/importmap.rb can be reused when deploying to another machine for example.

Say I have the following config/importmap.rb (created using pin commands):
pin "application" pin "@hotwired/turbo-rails", to: "turbo.min.js" pin "@hotwired/stimulus", to: "stimulus.min.js" pin "@hotwired/stimulus-loading", to: "stimulus-loading.js" pin '@fortawesome/fontawesome-free' pin "@rails/actioncable", to: "@rails--actioncable.js" # @7.1.3 pin_all_from "app/javascript/controllers", under: "controllers" pin_all_from "app/javascript/utils", under: "utils" pin_all_from "app/javascript/channels", under: "channels" pin "@fortawesome/fontawesome-svg-core", to: "@fortawesome--fontawesome-svg-core.js" # @6.5.2 ....

If is simply copy it to another deployment, several modules will be missing hence getting for example the following error:
Uncaught TypeError: Failed to resolve module specifier "@rails/actiontext". Relative references must start with either "/", "./", or "../".

Is there any way yet to reinstall locally those missing dependencies ?

May be related to #259
Thanks a lot

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