Skip to content
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

Missing modules when deploying to another folder/instance #281

Open
emmanuelcohenlaroque opened this issue Nov 20, 2024 · 0 comments
Open

Comments

@emmanuelcohenlaroque
Copy link

emmanuelcohenlaroque commented Nov 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant