Reputation: 31
so i'm trying to push my project onto Heroku but I keep running into this issue.
I've tried various different options and it still giving me the same error
The error is:
remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: Yarn executable was not detected in the system. remote: Download Yarn at https://yarnpkg.com/en/docs/install remote: I, [2018-07-11T15:38:38.244799 #1469] INFO -- : Writing /tmp/build_3216acb17a7c6513d0bbba80e51b87ec/public/assets/America_Latina_red.svg-81715f166cd02474df00ef6b91e8b614eee8c4b849a497d4b3d5f548b83fcd59.png remote: I, [2018-07-11T15:38:38.263447 #1469] INFO -- : Writing /tmp/build_3216acb17a7c6513d0bbba80e51b87ec/public/assets/magnifyingglass-f96713ba24099755cdd1bb1bb92c720b1136c87a85f437489a8cdb47e0f272af.png remote: rake aborted! remote: Sprockets::FileNotFound: couldn't find file 'bulma-start/_javascript/main.js' with type 'application/javascript' remote: Checked in these paths:
it says Sprockets:FileNotFound... everything is working locally. Also I'm using RoR
Upvotes: 1
Views: 845
Reputation: 41
It looks like you have node dependencies so you're application should be running multiple buildpacks (ruby and nodejs). Here's how to define them using Heroku CLI:
heroku buildpacks:set heroku/ruby
heroku buildpacks:add --index 1 heroku/nodejs
git push heroku main
Find more details here: https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app
Upvotes: 3
Reputation: 31
My /node_modules were inside my .gitignore. I removed node modules from .gitignore then in my terminal did:
RAILS_ENV=production bundle exec rake assets:precompile
then did git add .
git commit - m "my message"
git push heroku master
That's why when heroku was precompiling it was getting an error.
Upvotes: -1
Reputation: 3465
You're referencing bulma-start/_javascript/main.js
somewhere, but that file does not exist. Remove the bad reference.
Upvotes: 0