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

Build failed: Sprockets::FileNotFound: couldn't find file #1328

Closed
collimarco opened this issue Nov 1, 2022 · 1 comment
Closed

Build failed: Sprockets::FileNotFound: couldn't find file #1328

collimarco opened this issue Nov 1, 2022 · 1 comment

Comments

@collimarco
Copy link

I get this error while building a Rails 7 application (that was upgraded from previous rails versions):

-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       rake aborted!
       Sprockets::FileNotFound: couldn't find file 'emojionearea/dist/emojionearea' with type 'text/css'

The problem is that you should run rake yarn:install BEFORE rake assets:precompile... otherwise some assets are not present.

Can you fix this?

Note: I am using "heroku/buildpacks:20" because "heroku/buildpacks:22" does not exist here...

@schneems
Copy link
Contributor

schneems commented Oct 6, 2023

We only run the rake assets:precompile we don't run rake yarn:install. If you need that it's up to you to hook into the rake tasks chain. That's how gems like webpacker work, they enhance the rake task.

@schneems schneems closed this as completed Oct 6, 2023
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