sindresorhus / got

🌐 Human-friendly and powerful HTTP request library for Node.js
MIT License
14.27k stars 935 forks source link

Build in China #2213

Closed smart2pet closed 1 year ago

smart2pet commented 1 year ago

Describe the bug

Actual behavior

Problem in building. Probably because google services are being blocked in China. Output log:

node:events:491
      throw er; // Unhandled 'error' event
      ^
ErrorClass [RequestError]: connect ETIMEDOUT 142.251.42.225:443
    at ClientRequest.<anonymous> (D:\...\node_modules\got\index.js:73:21)
    at Object.onceWrapper (node:events:628:26)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:494:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on DuplexWrapper instance at:
    at EventEmitter.emit (node:events:513:28)
    at ClientRequest.<anonymous> (D:\...\node_modules\got\index.js:73:7)
    at Object.onceWrapper (node:events:628:26)
    [... lines matching original stack trace ...]
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ETIMEDOUT',
  host: 'clients2.googleusercontent.com',
  hostname: 'clients2.googleusercontent.com',
  method: 'GET',

Expected behavior

Building without errors in all regions.

Code to reproduce

Run yarn install in a computer that connects the network in China. And you'll got this error.

Checklist

sindresorhus commented 1 year ago

I think you opened this in the wrong repo.

smart2pet commented 1 year ago

No. It's the code of this library.

smart2pet commented 1 year ago

at ClientRequest. (D:...\node_modules\got\index.js:73:7)