atom/node-keytar

Document or Add config for prebuild-install downloads from private repository.

ctm8788 opened this issue · 1 comments

Summary

We develop behind a corporate network/firewall that has traffic to external sites proxied. We also have the npm regististries mirrored internally.

One of our dependencies is for node-keytar and it is attempting to download straight for github.
prebuild-install http request GET https://github.com/atom/node-keytar/releases/download/v7.7.0/keytar-v7.7.0-napi-v3-linux-x64.tar.gz

This request eventually times out.

For similar issues, I'm able to set a config in the .npmrc file and it'll download the requested package from our servers instead of going outside the network.
e.g.
npm config set grpc_node_binary_host_mirror https://repository.internal.com/repository/googleapis-storage/node-precompiled-binaries.grpc.io/

It would be nice if this was an option for node-keytar, or if it is...that it was documented.

Otherwise, I have to wait for the request to timeout (15 minutes) and then it looks like it builds it locally.

Motivation

This is useful build systems that don't have access to the internet directly and rely on internal repositories.

13:28:40 13:28:40 > keytar@7.7.0 install /root/app/node_modules/keytar 13:28:40 > prebuild-install || npm run build 13:28:40 13:28:40 prebuild-install info begin Prebuild-install version 6.1.4 13:28:40 prebuild-install info looking for local prebuild @ prebuilds/keytar-v7.7.0-napi-v3-linux-x64.tar.gz 13:28:40 prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/5cfba9-keytar-v7.7.0-napi-v3-linux-x64.tar.gz 13:28:40 prebuild-install http request GET https://github.com/atom/node-keytar/releases/download/v7.7.0/keytar-v7.7.0-napi-v3-linux-x64.tar.gz 13:44:32 prebuild-install WARN install read ETIMEDOUT 13:44:33 npm info it worked if it ends with ok 13:44:33 npm verb cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ] 13:44:33 npm info using npm@6.14.12 13:44:33 npm info using node@v10.24.1