pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Proxy issue

Open g3r4n opened this issue 9 years ago • 11 comments

At work i'm dehind a proxy and i got the folowing error message :

> Fetching base Node.js binaries to: ~/.pkg-cache
  fetched-v7.6.0-win-x64       [====================] 100%
> Error! connect ETIMEDOUT 192.30.253.113:443
> Asset 'v1.9/uploaded-v1.9-node-v7.6.0-win-x64' not found by direct link
> Error! connect ETIMEDOUT 192.30.253.117:443

do i have to configure something ? I already configure npm to go through my proxy.

g3r4n avatar May 12 '17 07:05 g3r4n

Ugly solution : got to https://github.com/zeit/pkg-fetch/releases/tag/v1.9 Download the versions you want go to your ./pkg-cache folder (for me win computer : C:\Users\{userid}\.pkg-cache\v1.9) copy the bin downloaded before change the start of the file to be starting by fetched and not uploaded remove file with '.downloading' try again it should work

g3r4n avatar May 12 '17 07:05 g3r4n

👍

igorklopov avatar May 13 '17 00:05 igorklopov

This solution should be part of the docs. See #243

ValeTheVioletMote avatar May 22 '19 15:05 ValeTheVioletMote

Note also that as of now just replacing uploaded with fetched doesn't work - you'll want to have the failure first so there's that .downloading file and rename it to what the .downloading file had, then just remove .downloading

ValeTheVioletMote avatar May 22 '19 15:05 ValeTheVioletMote

This is old but still, it might be useful to some :

PKG uses the module PKG-FETCH to download required bin files. PKG-FETCH uses REQUEST module to query github. REQUEST uses by default your HTTPS_PROXY and HTTP_PROXY environment variables to send request. So just set this or these var and you'll be good to go.

If you still have an error like "Failed to get local issuer certificate" then your you can try to set NODE_TLS_REJECT_UNAUTHORIZED=0

theebasso avatar Jun 24 '19 09:06 theebasso

Facing same error , can you help

Targets not specified. Assuming: node10-linux-x64, node10-macos-x64, node10-win-x64 Fetching base Node.js binaries to PKG_CACHE_PATH fetched-v10.15.3-win-x64 [ ] 0% Error! getaddrinfo EAI_AGAIN github.com github.com:443 Asset not found by direct link: {"tag":"v2.6","name":"uploaded-v2.6-node-v10.15.3-win-x64"} Error! getaddrinfo EAI_AGAIN api.github.com api.github.com:443

Amulyagarg avatar Jul 05 '19 05:07 Amulyagarg

Try these steps https://docs.cloudfoundry.org/cf-cli/http-proxy.html And most importantly, restart your machine and try the pkg . command again. It definitely works!

rashmimilan avatar Sep 17 '19 04:09 rashmimilan

I tried (in CMD of Windows):

SET HTTP_PROXY="http://domain%5Cusername:password@proxy:80" SET HTTPS_PROXY="http://domain%5Cusername:password@proxy:80"

But it didn't work.

I also tried:

npm config set proxy http://domain%5Cusername:password@proxy:80 npm config set https-proxy http://domain%5Cusername:password@proxy:80

But it didn't work either.

Aymkdn avatar Mar 04 '21 08:03 Aymkdn

Solution:

  1. Run pkg with the expected targets
  2. It will return an error like the below:

[email protected] Fetching base Node.js binaries to PKG_CACHE_PATH fetched-v12.18.1-win-x64 [ ] 0% Error! tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:80 Asset not found by direct link: {"tag":"v2.6","name":"uploaded-v2.6-node-v12.18.1-win-x64"} Error! tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:80

  1. Go to https://github.com/zeit/pkg-fetch/releases/ – make sure you look at the same version as your current pkg
  2. Search for the uploaded version that appears in the error message (e.g. "uploaded-v2.6-node-v12.18.1-win-x64")
  3. Download the version to the ./pkg-cache folder (for Windows: C:\Users\{userid}\.pkg-cache\vX.Y) – delete all the files there that have the .downloading extension
  4. Rename the downloaded file using the name of the fetched one in the error message (e.g. "fetched-v12.18.1-win-x64")
  5. Try again the pkg command

Aymkdn avatar Mar 04 '21 09:03 Aymkdn

Hi,

Are you working behind some corporate proxy?

On Thu, 4 Mar, 2021, 2:09 pm Aymeric, [email protected] wrote:

I tried:

SET HTTP_PROXY="http://domain%5Cusername:password@proxy:80" SET HTTPS_PROXY="http://domain%5Cusername:password@proxy:80"

But it didn't work.

I also tried:

npm config set proxy http://domain%5Cusername:password@proxy:80 npm config set https-proxy http://domain%5Cusername:password@proxy:80

But it didn't work either.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vercel/pkg/issues/96#issuecomment-790432233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7JXL2CDDLIFNKNF6FM3FTTB5BLJANCNFSM4DLDW6HQ .

Amulyagarg avatar Mar 07 '21 17:03 Amulyagarg

Yes, I'm behind a corporate proxy.

I ended by doing it on another computer, not on the corporate network.

Aymkdn avatar Mar 07 '21 17:03 Aymkdn