We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node 20.6.1 giget 1.1.3
Start any proxy server with logging:
// https://github.com/berstend/straightforward $ npx straightforward straightforward forward-proxy running on localhost:9191
Set environment variable
$env:HTTPS_PROXY="http://127.0.0.1:9191"
export HTTPS_PROXY="http://127.0.0.1:9191"
Run curl -x http://127.0.0.1:9191 https://example.com to confirm the proxy is working and is printing proxy connections:
curl -x http://127.0.0.1:9191 https://example.com
CONNECT example.com:443
Run npx giget github:withastro/astro/examples/basics#latest ./output --force-clean --verbose.
npx giget github:withastro/astro/examples/basics#latest ./output --force-clean --verbose
No connection is made through the proxy.
giget should use the proxy set in environment variable.
https://github.com/unjs/node-fetch-native/blob/47e92fdae1356d3970e40dfafa5614d2c0f68a87/src/index.ts#L22-L29 giget by default is using node's built in fetch in node 20.
fetch
The built-in fetch is the same as undici.fetch. https://github.com/nodejs/node/blob/3e14cfbbcfcedbb18235ffd5cc28983ac5d5ca52/lib/internal/process/pre_execution.js#L314-L316
undici.fetch
undici does not support http.Agent but uses a different API: https://undici.nodejs.org/#/docs/api/ProxyAgent
http.Agent
Workaround: set the environment variable FORCE_NODE_FETCH.
FORCE_NODE_FETCH
No response
The text was updated successfully, but these errors were encountered:
Same here. I can't download template in create-astro
create-astro
Sorry, something went wrong.
The solution provided is useful, set FORCE_NODE_FETCH=1
for powershell, as follows: $ENV:FORCE_NODE_FETCH=1
$ENV:FORCE_NODE_FETCH=1
nuxi init
Proxy support is added in the latest version of giget for Node.js versions with native fetch (undici) (read more)
You can get the feature by upgrading your lockfile.
Successfully merging a pull request may close this issue.
Environment
node 20.6.1
giget 1.1.3
Reproduction
Start any proxy server with logging:
Set environment variable
Run
curl -x http://127.0.0.1:9191 https://example.com
to confirm the proxy is working and is printing proxy connections:Run
npx giget github:withastro/astro/examples/basics#latest ./output --force-clean --verbose
.No connection is made through the proxy.
Describe the bug
giget should use the proxy set in environment variable.
https://github.com/unjs/node-fetch-native/blob/47e92fdae1356d3970e40dfafa5614d2c0f68a87/src/index.ts#L22-L29
giget by default is using node's built in
fetch
in node 20.The built-in
fetch
is the same asundici.fetch
.https://github.com/nodejs/node/blob/3e14cfbbcfcedbb18235ffd5cc28983ac5d5ca52/lib/internal/process/pre_execution.js#L314-L316
undici does not support
http.Agent
but uses a different API: https://undici.nodejs.org/#/docs/api/ProxyAgentAdditional context
Workaround: set the environment variable
FORCE_NODE_FETCH
.Logs
No response
The text was updated successfully, but these errors were encountered: