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

DoubleLinkError after generating app #2896

Closed
jcoyne opened this issue Feb 16, 2023 · 3 comments
Closed

DoubleLinkError after generating app #2896

jcoyne opened this issue Feb 16, 2023 · 3 comments

Comments

@jcoyne
Copy link
Member

jcoyne commented Feb 16, 2023

     Failure/Error:
       raise DoubleLinkError.new(
         parent_filename: parent_asset.filename,
         last_filename:   last_filename,
         logical_path:    asset.logical_path,
         filename:        asset.filename
       )

     ActionView::Template::Error:
       Multiple files with the same output path cannot be linked ("application.js")
       In "/Users/jcoyne85/workspace/projectblacklight/spotlight/.internal_test_app/app/assets/config/manifest.js" these files were linked:
         - /Users/jcoyne85/workspace/projectblacklight/spotlight/.internal_test_app/app/javascript/application.js
         - /Users/jcoyne85/workspace/projectblacklight/spotlight/.internal_test_app/app/assets/javascripts/application.js
     # /Users/jcoyne85/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.2.0/lib/sprockets/base.rb:100:in `find_all_linked_assets'
     # /Users/jcoyne85/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.2.0/lib/sprockets/manifest.rb:125:in `each'
     # /Users/jcoyne85/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.2.0/lib/sprockets/manifest.rb:125:in `to_a'
     # /Users/jcoyne85/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/sprockets-4.2.0/lib/sprockets/manifest.rb:125:in `block (2 levels) in find'

With blacklight 7.33.1 and rails 7.0.4.2

cat .internal_test_app/app/assets/config/manifest.js
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js

//= link spotlight/manifest.js
//= link openseadragon-assets

//= link application.js
@jcoyne
Copy link
Member Author

jcoyne commented Feb 16, 2023

@corylown
Copy link
Contributor

corylown commented Aug 14, 2024

I believe this was fixed by 176837f where a step was added to remove_file 'app/javascript/application.js' added by importmap. The DoubleLink error no longer occurs for the generated test app. It is still broken in the app generated following the installation instructions SKIP_TRANSLATION=1 rails new app-name -m https://raw.githubusercontent.com/projectblacklight/spotlight/main/template.rb as described by #2995

@jcoyne
Copy link
Member Author

jcoyne commented Aug 22, 2024

Yes, I'm still seeing it in the template generated app.

5.317 Sprockets::DoubleLinkError: Multiple files with the same output path cannot be linked ("application.js") (Sprockets::DoubleLinkError)
5.317 In "/spotlight/app/assets/config/manifest.js" these files were linked:
5.317   - /spotlight/app/assets/javascripts/application.js
5.317   - /spotlight/app/javascript/application.js
5.317
5.317 Tasks: TOP => assets:precompile
5.317 (See full trace by running task with --trace)
------

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

2 participants