learn-heroku icon indicating copy to clipboard operation
learn-heroku copied to clipboard

binwrap-install: not found

Open Danwhy opened this issue 7 years ago • 1 comments

While trying to deploy a new version of a Elixir/Phoenix and Elm app to heroku, I kept getting this error and failing to deploy:

remote:        > [email protected] install /tmp/build_aed45373ab53117201137c6bfc2c1e04/assets/node_modules/elm
remote:        > binwrap-install
remote:
remote:        sh: 1: binwrap-install: not found
remote:        npm ERR! file sh
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! errno ENOENT
remote:        npm ERR! syscall spawn
remote:        npm ERR! [email protected] install: `binwrap-install`
remote:        npm ERR! spawn ENOENT
remote:        npm ERR!
remote:        npm ERR! Failed at the [email protected] install script.
remote:        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I don't think it could have been caused by anything I did, as I had recently deployed the same day, and the only changes I had made were adding some csv files to the root directory. I also tried deploying other branches with only minimal changes, and got the same error.

I eventually managed to get around this error, but not in the most optimal way. Deploying the exact same branch that was failing to a brand new heroku instance worked fine, but any subsequent deployments would fail with the same error. This led me to think that the issue must be somewhere on the heroku or npm side.

I changed the version of both npm and node, and turned off the caching. I did this using the config file for the phoenix buildpack we are using (https://github.com/gjaldon/heroku-buildpack-phoenix-static):

phoenix_static_buildpack.config:

assets_path=assets
phoenix_ex=phx
node_version=9.3.0
npm_version=5.2.0
clean_cache=true

I'm not sure currently whether it's the cache or the specific npm version that fixes the error, but after doing this, I have deployed multiple updates with no problems.

Danwhy avatar Nov 16 '18 12:11 Danwhy

Hey @Danwhy, I am having the same issue. Any ideas on how I can solve this? I am using the same phoenix_static_buildpack.config as yours.

Regards.

edborsa avatar May 13 '19 23:05 edborsa