Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Proxy issue #96

Closed
g3r4n opened this issue May 12, 2017 · 11 comments
Closed

Proxy issue #96

g3r4n opened this issue May 12, 2017 · 11 comments

Comments

@g3r4n
Copy link

g3r4n commented May 12, 2017

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
Copy link
Author

g3r4n commented May 12, 2017

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

@igorklopov
Copy link
Contributor

👍

@ValeTheVioletMote
Copy link

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

@ValeTheVioletMote
Copy link

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

@theebasso
Copy link

theebasso commented Jun 24, 2019

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

@Amulyagarg
Copy link

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

@rashmimilan
Copy link

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!

@Aymkdn
Copy link

Aymkdn commented Mar 4, 2021

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
Copy link

Aymkdn commented Mar 4, 2021

Solution:

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

pkg@4.4.9
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

@Amulyagarg
Copy link

Amulyagarg commented Mar 7, 2021 via email

@Aymkdn
Copy link

Aymkdn commented Mar 7, 2021

Yes, I'm behind a corporate proxy.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants