Sharp: Failure building node-gyp: 403 downloading binaries from bintray

Created on 29 Sep 2017  ·  39Comments  ·  Source: lovell/sharp

Hi, I'm getting an error installing sharp in our CI environment:

lerna ERR! execute ERROR: https://dl.bintray.com/lovell/sharp/libvips-8.5.5-linux-x64.tar.gz status code 403

Rest of the output:

lerna ERR! execute error /home/jenkins/workspace/40d5bcb5/workspace/_reporting_reporting_PR-913-BC3JIYRAJGNCZDW7WEMZAY67U4MU3IJFTQGYTDBTHSZHTJ3BA5LA/services/pdf-comp-service/node_modules/sharp: Command failed.
lerna ERR! execute Exit code: 1
lerna ERR! execute Command: node-gyp rebuild
lerna ERR! execute Arguments: 
lerna ERR! execute Directory: /home/jenkins/workspace/40d5bcb5/workspace/_reporting_reporting_PR-913-BC3JIYRAJGNCZDW7WEMZAY67U4MU3IJFTQGYTDBTHSZHTJ3BA5LA/services/pdf-comp-service/node_modules/sharp
lerna ERR! execute Output:
lerna ERR! execute ERROR: https://dl.bintray.com/lovell/sharp/libvips-8.5.5-linux-x64.tar.gz status code 403
lerna ERR! execute gyp: Call to 'node -e "require('./binding').download_vips()"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
lerna ERR! execute gyp ERR! configure error 
lerna ERR! execute gyp ERR! stack Error: `gyp` failed with exit code: 1
lerna ERR! execute gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
lerna ERR! execute gyp ERR! stack     at emitTwo (events.js:125:13)
lerna ERR! execute gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
lerna ERR! execute gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
lerna ERR! execute gyp ERR! System Linux 3.10.0-514.16.1.el7.x86_64
lerna ERR! execute gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
blocked-upstream-dependency

Most helpful comment

In case we lose Bintray again, Github-hosted backups of libvips v8.5.5 for sharp v0.18.x are at:

https://github.com/lovell/sharp-libvips/releases/tag/v8.5.5

SHARP_DIST_BASE_URL="https://github.com/lovell/sharp-libvips/releases/download/v8.5.5/" npm install sharp

Back to work everyone!

All 39 comments

I'm also hitting this error from multiple locations; it looks like https://dl.bintray.com/lovell/sharp/libvips-8.5.5-linux-x64.tar.gz does not exist although it happens to be listed on https://dl.bintray.com/lovell/sharp/, in fact, none of the binaries are being served.

Is there a fallback location for these files?

For some reason, setting SHARP_DIST_BASE_URL does not work when using "sharp": "0.18.2", still tries to download from third party source.

For example:

npm config set SHARP_DIST_BASE_URL=http://internal-server/3rd-party.releases/lovell/sharp/libvips/8.5.5/

or

export SHARP_DIST_BASE_URL=http://internal-server/3rd-party.releases/lovell/sharp/libvips/8.5.5/
````

__Note__: this works for me

SHARP_DIST_BASE_URL="http://internal-server/3rd-party.releases/lovell/sharp/libvips/8.5.5/" npm install sharp
```

Apparentally, bintray.com has rate-limits (e.g. mentioned here https://github.com/deis/workflow/issues/282#issuecomment-223607164). So this probably went over and now any new connections are restricted. :-(

Any chance @lovell could remove the limits for your account?

Cheers

I contacted Bintray support about this at 13:20 UTC, no response from them yet.

@longieirl SHARP_DIST_BASE_URL is an environment variable rather than npm config.

The forthcoming v0.19.x release will use Github Releases instead of Bintray - see #851

/cc @jbaruch

Having the same issue...

@troypayne us too - i believe anyone trying to npm install sharp will have the same issue. we'll look for updates here.

Whilst everyone waits for Bintray to lift the temporary rate-limiting, and if you're able to share details publicly, it's always great to learn about what people are using sharp for in the survey at #35.

Is there a way to provide those binaries via a Github release binary URL?

We have to learn from this error.. no?

Edit: Or at least have redundant URL... Github + bintray.com

PS: @jagu-sayan CC

@yvele https://github.com/lovell/sharp/issues/851 :-)

The scripts to build the binary tarballs are available in https://github.com/lovell/sharp/tree/master/packaging

You can run these locally then either:

  1. self host, setting the SHARP_DIST_BASE_URL environment variable
  2. untar into node_modules/sharp/vendor then npm rebuild

@lovell I don't see a folder for Mac under https://github.com/lovell/sharp/tree/master/packaging. Any suggestions for building on Mac.

@jcarley brew install vips

@lovell is there instructions somewhere that explains how to build a similar libvips-8.5.5-darwin-x64.tar.gz? I have a scenario where I need libvips-8.5.5-darwin-x64.tar.gz.

@longieirl, @lovell can you share a URL to a prebuilt libvips-8.5.5-linux-x64.tar.gz?

Our team has been trying to build it using https://github.com/lovell/lovell/sharp-libvips but are getting "xz: (stdin): File format not recognized" errors.

@lovell found this: https://github.com/lovell/package-libvips-darwin

Going to give that a try

@bermi I'm going to try and build that file using Docker. If successful, I can upload it to a location for you to download and host yourself.

someone managed to make it work in AWS ElasticBeanstalk?

Hello everyone, I'm trying to build the necessary version as well. @danilovianna my stack runs in ELB, if I manage to make it work, I give you a heads up

tks

I made a tweet to @bintray to give this issue more visibility https://twitter.com/mryvele/status/913790609470689282

image

hope this will help.. we are stuck 😓

@bermi I got the same error.

Lovell Fuller‏ @lovell 22 sil y a 22 secondes
En réponse à @mryvele @bintray
The Bintray support ticket ID for this problem is 69750.

Source: https://twitter.com/lovell/status/913791503075614722

any alternate link for the binaries? I ran into this error, decided to remove my node_modules/ and now I'm stuck :(

Having this same issue.

On macOS I was able to brew tap homebrew/science and then brew install vips to get the dependency locally.

Hey everyone
Is there any workaround to still get npm install to work? Our productive CI just hit the floor with this and I wonder how I can get the instances up again... At least until the fix is out. Downgrading to 0.18.2 did not seem to help.. :S

I have a windows binary built. Mac version is in process on Travis-CI. I'm still unable to get a Linux x64 binary using Docker.

All versions of sharp will search for and use a globally-installed version of libvips.

"To use a globally-installed version of libvips instead of the provided binaries, make sure it is at least the version listed under config.libvips in the package.json file and that it can be located using pkg-config --modversion vips-cpp."

@danilovianna are you using docker?

If that can help anyone, I used a little proxy to download the 8.6.0 versions hosted on Github instead of the 8.5.5 versions (using the SHARP_DIST_BASE_URL environment variable to point to it during the install).

https://gist.github.com/rhumaric/0601c75a89bf1fc5ff28e0c150eb7b0a

Can't say if there's impact on how things work as I'm just starting a project with it, but at least I can get going :)

@lovell - brew install vips seems to fix it. Thanks!

I am still building but I noticed it is back up (ex. https://dl.bintray.com/lovell/sharp/libvips-8.5.5-linux-x64.tar.gz)

It is now back. Hopefully the problem will solve forever with version 0.19.x .

I can confirm it works with 18.4

In case we lose Bintray again, Github-hosted backups of libvips v8.5.5 for sharp v0.18.x are at:

https://github.com/lovell/sharp-libvips/releases/tag/v8.5.5

SHARP_DIST_BASE_URL="https://github.com/lovell/sharp-libvips/releases/download/v8.5.5/" npm install sharp

Back to work everyone!

Hey guys, we increased the download quota. @lovell which address should I use for an email about how we make sure it won't happen again?

@jbaruch Thank you! Feel free to contact me at the address in package.json#L5.

Im still hitting:
ERROR: Download of https://dl.bintray.com/lovell/sharp/libvips-8.5.5-linux-x64.tar.gz failed: Response code 404 (Not Found)

So sadly not solved for me :/

Was this page helpful?
0 / 5 - 0 ratings