Skip to content
New issue

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

Support changing download source in postinstall #3081

Open
typed-sigterm opened this issue Jan 28, 2025 · 3 comments
Open

Support changing download source in postinstall #3081

typed-sigterm opened this issue Jan 28, 2025 · 3 comments

Comments

@typed-sigterm
Copy link

typed-sigterm commented Jan 28, 2025

Is your feature request related to a problem? Please describe.
You know what GFW had being doing😶

const url = `https://github.com/${repo}/releases/download/v${version}/${pkgName}_${platform}_${arch}.tar.gz`;

const checksumFileUrl = `https://github.com/${repo}/releases/download/v${version}/${pkgName}_${version}_checksums.txt`;

Describe the solution you'd like
Read template string from an environment variable to replace the hard-coded url.

@sweatybridge
Copy link
Contributor

Do you have the error logs by any chance? I believe we are already handling https_proxy variables using https-proxy-agent package.

@typed-sigterm
Copy link
Author

Do you have the error logs by any chance? I believe we are already handling https_proxy variables using https-proxy-agent package.

That's fixed after rebooting :)

@typed-sigterm
Copy link
Author

typed-sigterm commented Feb 10, 2025

This is a very serious issue for devs in China. I think we can publish binaries to npm, just like what bun is doing. Then npmmirror will accept this.

update: Now I can confirm that it's by passing the proxy. (using bun v1.2.2) My teammate can reproduce it too.

Logs
  📦 Installing [1195/1194] [Scripts] Starting scripts for "@parcel/watcher"
[Scripts] Starting scripts for "esbuild"
[Scripts] Starting scripts for "supabase"
  ⚙️  supabase [2/3] [Scripts] Finished scripts for "@parcel/watcher"
  ⚙️  supabase [3/3] Downloading https://github.com/supabase/cli/releases/download/v2.9.6/supabase_2.9.6_checksums.txt        
[Scripts] Finished scripts for "esbuild"
warn: supabase's postinstall has costed you 5.5s
warn: supabase's postinstall has costed you 10.5s
warn: supabase's postinstall has costed you 15.6s
warn: supabase's postinstall has costed you 20.6s
file:///D:/hzh/paper-chemis-website/node_modules/node-fetch/src/index.js:108
                        reject(new FetchError(`request to ${request.url} failed, reason: ${error.message}`, 'system', error));
                               ^

FetchError: request to https://github.com/supabase/cli/releases/download/v2.9.6/supabase_2.9.6_checksums.txt failed, reason: connect ETIMEDOUT 20.205.243.166:443
    at ClientRequest.<anonymous> (file:///.../node_modules/node-fetch/src/index.js:108:11)
    at ClientRequest.emit (node:events:524:28)
    at emitErrorEvent (node:_http_client:104:11)
    at TLSSocket.socketErrorListener (node:_http_client:518:5)
    at TLSSocket.emit (node:events:524:28)
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  type: 'system',
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT',
  erroredSysCall: 'connect'
}

Node.js v22.13.1
error: postinstall script from "supabase" exited with 1

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

No branches or pull requests

2 participants