I am building Rails 4.x app that runs on Heroku. And I recently added browserify-rails to the app then I got an error below while deploying it to Heroku.
BrowserifyRails::BrowserifyError: browserify could not be found at /tmp/build_7afd0a3da809f3510421bfa4737d3bf8/./node_modules/.bin/browserify. Please run npm install.
I've tried a lot of thing and finally found the solution. Here is the process for solving this issue.
heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
.buildpacks file for the multi-buildpack to make sure node.js is compiled before ruby.
rake assets:precompile in heroku deploy expects
browserify to be installed in
.node_modules directory. So move it from
npm uninstall browserify --save-dev npm install browserify --save
Now try to deploy again!
git push heroku master
It should work now.comments powered by Disqus