jjangga0214 / hasura-cli

Hasura CLI as an npm package
https://www.npmjs.com/package/hasura-cli
90 stars 27 forks source link

Issue while installling hasura-cli #111

Closed RamanSharma100 closed 10 months ago

RamanSharma100 commented 10 months ago

please help me with this issue when i am installing hasura cli it is giving connection error while downloading binaries in postinstall script

node_modules/.pnpm/hasura-cli@2.35.1/node_modules/hasura-cli: Running postinstall script, failed in 22.4s .../node_modules/hasura-cli postinstall$ node dist/index.js │ hasura-cli@2.35.1 │ Downloading Hasura CLI binary v2.35.1 from https://github.com/hasura/graphql-engine/releases/download/v2.35.1/cli-h… │ hasura-cli@2.35.1 │ Error! Failed to install Hasura CLI binary. │ Try npm uninstall hasura-cli or yarn remove hasura-cli and then reinstall it. │ If the issue occurs repeatedly, check if your network can access https://github.com as the the Hasura CLI binary fi… │ You can report the issue on https://github.com/jjangga0214/hasura-cli/issues with error message. │ │ node:internal/process/promises:288 │ triggerUncaughtException(err, true / fromPromise /); │ ^ │ <ref 1> Error: connect ETIMEDOUT 64:ff9b::14cf:4952:443 │ at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16) { │ errno: -4039, │ code: 'ETIMEDOUT', │ syscall: 'connect', │ address: '64:ff9b::14cf:4952', │ port: 443, │ config: { │ url: 'https://github.com/hasura/graphql-engine/releases/download/v2.35.1/cli-hasura-windows-amd64.exe', │ method: 'get', │ headers: { Accept: 'application/octet-stream', 'User-Agent': 'hasura-cli' }, │ transformRequest: [ [Function: transformRequest] ], │ transformResponse: [ [Function: transformResponse] ], │ timeout: 0, │ adapter: [Function: httpAdapter], │ responseType: 'stream', │ xsrfCookieName: 'XSRF-TOKEN', │ xsrfHeaderName: 'X-XSRF-TOKEN', │ maxContentLength: -1, │ maxBodyLength: -1, │ validateStatus: [Function: validateStatus], │ transitional: { │ silentJSONParsing: true, │ forcedJSONParsing: true, │ clarifyTimeoutError: false │ }, │ data: undefined │ }, │ request: <ref 4> Writable { │ _writableState: WritableState { │ objectMode: false, │ highWaterMark: 16384, │ finalCalled: false, │ needDrain: false, │ ending: false, │ ended: false, │ finished: false, │ destroyed: false, │ decodeStrings: true, │ defaultEncoding: 'utf8', │ length: 0, │ writing: false, │ corked: 0, │ sync: true, │ bufferProcessing: false, │ onwrite: [Function: bound onwrite], │ writecb: null, │ writelen: 0, │ afterWriteTickInfo: null, │ buffered: [], │ bufferedIndex: 0, │ allBuffers: true, │ allNoop: true, │ pendingcb: 0, │ constructed: true, │ prefinished: false, │ errorEmitted: false, │ emitClose: true, │ autoDestroy: true, │ errored: null, │ closed: false, │ closeEmitted: false, │ [Symbol(kOnFinished)]: [] │ }, │ _events: [Object: null prototype] { │ response: [Function: handleResponse], │ error: [Function: handleRequestError] │ }, │ _eventsCount: 2, │ _maxListeners: undefined, │ _options: { │ maxRedirects: 21, │ maxBodyLength: 10485760, │ protocol: 'https:', │ path: '/hasura/graphql-engine/releases/download/v2.35.1/cli-hasura-windows-amd64.exe', │ method: 'GET', │ headers: { │ Accept: 'application/octet-stream', │ 'User-Agent': 'hasura-cli' │ }, │ agent: undefined, │ agents: { http: undefined, https: undefined }, │ auth: undefined, │ hostname: 'github.com', │ port: null, │ nativeProtocols: { │ 'http:': { │ _connectionListener: [Function: connectionListener], │ METHODS: [ │ 'ACL', 'BIND', 'CHECKOUT', │ 'CONNECT', 'COPY', 'DELETE', │ 'GET', 'HEAD', 'LINK', │ 'LOCK', 'M-SEARCH', 'MERGE', │ 'MKACTIVITY', 'MKCALENDAR', 'MKCOL', │ 'MOVE', 'NOTIFY', 'OPTIONS', │ 'PATCH', 'POST', 'PROPFIND', │ 'PROPPATCH', 'PURGE', 'PUT', │ 'REBIND', 'REPORT', 'SEARCH', │ 'SOURCE', 'SUBSCRIBE', 'TRACE', │ 'UNBIND', 'UNLINK', 'UNLOCK', │ 'UNSUBSCRIBE' │ ], │ STATUS_CODES: { │ '100': 'Continue', │ '101': 'Switching Protocols', │ '102': 'Processing', │ '103': 'Early Hints', │ '200': 'OK', │ '201': 'Created', │ '202': 'Accepted', │ '203': 'Non-Authoritative Information', │ '204': 'No Content', │ '205': 'Reset Content', │ '206': 'Partial Content', │ '207': 'Multi-Status', │ '208': 'Already Reported', │ '226': 'IM Used', │ '300': 'Multiple Choices', │ '301': 'Moved Permanently', │ '302': 'Found', │ '303': 'See Other', │ '304': 'Not Modified', │ '305': 'Use Proxy', │ '307': 'Temporary Redirect', │ '308': 'Permanent Redirect', │ '400': 'Bad Request', │ '401': 'Unauthorized', │ '402': 'Payment Required', │ '403': 'Forbidden', │ '404': 'Not Found', │ '405': 'Method Not Allowed', │ '406': 'Not Acceptable', │ '407': 'Proxy Authentication Required', │ '408': 'Request Timeout', │ '409': 'Conflict', │ '410': 'Gone', │ '411': 'Length Required', │ '412': 'Precondition Failed', │ '413': 'Payload Too Large', │ '414': 'URI Too Long', │ '415': 'Unsupported Media Type', │ '416': 'Range Not Satisfiable', │ '417': 'Expectation Failed', │ '418': "I'm a Teapot", │ '421': 'Misdirected Request', │ '422': 'Unprocessable Entity', │ '423': 'Locked', │ '424': 'Failed Dependency', │ '425': 'Too Early', │ '426': 'Upgrade Required', │ '428': 'Precondition Required', │ '429': 'Too Many Requests', │ '431': 'Request Header Fields Too Large', │ '451': 'Unavailable For Legal Reasons', │ '500': 'Internal Server Error', │ '501': 'Not Implemented', │ '502': 'Bad Gateway', │ '503': 'Service Unavailable', │ '504': 'Gateway Timeout', │ '505': 'HTTP Version Not Supported', │ '506': 'Variant Also Negotiates', │ '507': 'Insufficient Storage', │ '508': 'Loop Detected', │ '509': 'Bandwidth Limit Exceeded', │ '510': 'Not Extended', │ '511': 'Network Authentication Required' │ }, │ Agent: [Function: Agent] { defaultMaxSockets: Infinity }, │ ClientRequest: [Function: ClientRequest], │ IncomingMessage: [Function: IncomingMessage], │ OutgoingMessage: [Function: OutgoingMessage], │ Server: [Function: Server], │ ServerResponse: [Function: ServerResponse], │ createServer: [Function: createServer], │ validateHeaderName: [Function: nodeinternal], │ validateHeaderValue: [Function: nodeinternal], │ get: [Function: get], │ request: [Function: request], │ setMaxIdleHTTPParsers: [Function: setMaxIdleHTTPParsers], │ maxHeaderSize: [Getter], │ globalAgent: [Getter/Setter] │ }, │ 'https:': { │ Agent: [Function: Agent], │ globalAgent: Agent { │ _events: [Object: null prototype], │ _eventsCount: 2, │ _maxListeners: undefined, │ defaultPort: 443, │ protocol: 'https:', │ options: [Object: null prototype], │ requests: [Object: null prototype] {}, │ sockets: [Object: null prototype], │ freeSockets: [Object: null prototype] {}, │ keepAliveMsecs: 1000, │ keepAlive: false, │ maxSockets: Infinity, │ maxFreeSockets: 256, │ scheduling: 'lifo', │ maxTotalSockets: Infinity, │ totalSocketCount: 1, │ maxCachedSessions: 100, │ _sessionCache: [Object], │ [Symbol(kCapture)]: false │ }, │ Server: [Function: Server], │ createServer: [Function: createServer], │ get: [Function: get], │ request: [Function: request] │ } │ }, │ pathname: '/hasura/graphql-engine/releases/download/v2.35.1/cli-hasura-windows-amd64.exe' │ }, │ _ended: true, │ _ending: true, │ _redirectCount: 0, │ _redirects: [], │ _requestBodyLength: 0, │ _requestBodyBuffers: [], │ _onNativeResponse: [Function (anonymous)], │ _currentRequest: <ref 2> ClientRequest { │ _events: [Object: null prototype] { │ response: [Function: bound onceWrapper] { │ listener: [Function (anonymous)] │ }, │ abort: [Function (anonymous)], │ aborted: [Function (anonymous)], │ connect: [Function (anonymous)], │ error: [Function (anonymous)], │ socket: [Function (anonymous)], │ timeout: [Function (anonymous)] │ }, │ _eventsCount: 7, │ _maxListeners: undefined, │ outputData: [], │ outputSize: 0, │ writable: true, │ destroyed: false, │ _last: true, │ chunkedEncoding: false, │ shouldKeepAlive: false, │ maxRequestsOnConnectionReached: false, │ _defaultKeepAlive: true, │ useChunkedEncodingByDefault: false, │ sendDate: false, │ _removedConnection: false, │ _removedContLen: false, │ _removedTE: false, │ strictContentLength: false, │ _contentLength: 0, │ _hasBody: true, │ _trailer: '', │ finished: true, │ _headerSent: true, │ _closed: false, │ socket: <ref 3> TLSSocket { │ _tlsOptions: { │ allowHalfOpen: undefined, │ pipe: false, │ secureContext: SecureContext { context: SecureContext {} }, │ isServer: false, │ requestCert: true, │ rejectUnauthorized: true, │ session: undefined, │ ALPNProtocols: undefined, │ requestOCSP: undefined, │ enableTrace: undefined, │ pskCallback: undefined, │ highWaterMark: undefined, │ onread: undefined, │ signal: undefined │ }, │ _secureEstablished: false, │ _securePending: false, │ _newSessionPending: false, │ _controlReleased: true, │ secureConnecting: true, │ _SNICallback: null, │ servername: null, │ alpnProtocol: null, │ authorized: false, │ authorizationError: null, │ encrypted: true, │ _events: [Object: null prototype] { │ close: [ │ [Function: onSocketCloseDestroySSL], │ [Function], │ [Function: onClose], │ [Function: socketCloseListener] │ ], │ end: [ [Function: onConnectEnd], [Function: onReadableStreamEnd] ], │ newListener: [Function: keylogNewListener], │ connect: [ [Function], [Function], [Function] ], │ secure: [Function: onConnectSecure], │ session: [Function (anonymous)], │ free: [Function: onFree], │ timeout: [Function: onTimeout], │ agentRemove: [Function: onRemove], │ error: [Function: socketErrorListener], │ drain: [Function: ondrain] │ }, │ _eventsCount: 11, │ connecting: false, │ _hadError: true, │ _parent: null, │ _host: 'github.com', │ _closeAfterHandlingError: false, │ _readableState: ReadableState { │ objectMode: false, │ highWaterMark: 16384, │ buffer: BufferList { head: null, tail: null, length: 0 }, │ length: 0, │ pipes: [], │ flowing: true, │ ended: false, │ endEmitted: false, │ reading: true, │ constructed: true, │ sync: false, │ needReadable: true, │ emittedReadable: false, │ readableListening: false, │ resumeScheduled: false, │ errorEmitted: true, │ emitClose: false, │ autoDestroy: true, │ destroyed: true, │ errored: [Circular *1], │ closed: true, │ closeEmitted: true,

│ defaultEncoding: 'utf8', │ awaitDrainWriters: null, │ multiAwaitDrain: false, │ readingMore: false, │ dataEmitted: false, │ decoder: null, │ encoding: null, │ [Symbol(kPaused)]: false │ }, │ _maxListeners: undefined, │ _writableState: WritableState { │ objectMode: false, │ highWaterMark: 16384, │ finalCalled: false, │ needDrain: false, │ ending: false, │ ended: false, │ finished: false, │ destroyed: true, │ decodeStrings: false, │ defaultEncoding: 'utf8', │ length: 189, │ writing: true, │ corked: 0, │ sync: false, │ bufferProcessing: false, │ onwrite: [Function: bound onwrite], │ writecb: [Function: bound onFinish], │ writelen: 189, │ afterWriteTickInfo: null, │ buffered: [], │ bufferedIndex: 0, │ allBuffers: true, │ allNoop: true, │ pendingcb: 1, │ constructed: true, │ prefinished: false, │ errorEmitted: true, │ emitClose: false, │ autoDestroy: true, │ errored: [Circular 1], │ closed: true, │ closeEmitted: true, │ [Symbol(kOnFinished)]: [] │ }, │ allowHalfOpen: false, │ _sockname: null, │ _pendingData: 'GET /hasura/graphql-engine/releases/download/v2.35.1/cli-hasura-windows-amd64.exe HTTP/1.1\r… │ 'Accept: application/octet-stream\r\n' + │ 'User-Agent: hasura-cli\r\n' + │ 'Host: github.com\r\n' + │ 'Connection: close\r\n' + │ '\r\n', │ _pendingEncoding: 'latin1', │ server: undefined, │ _server: null, │ ssl: null, │ _requestCert: true, │ _rejectUnauthorized: true, │ parser: null, │ _httpMessage: [Circular 2], │ [Symbol(res)]: TLSWrap { │ _parent: TCP { │ reading: [Getter/Setter], │ onconnection: null, │ [Symbol(owner_symbol)]: [Circular 3], │ [Symbol(handle_onclose)]: [Function: done] │ }, │ _parentWrap: undefined, │ _secureContext: SecureContext { context: SecureContext {} }, │ reading: false, │ onkeylog: [Function: onkeylog], │ onhandshakestart: {}, │ onhandshakedone: [Function (anonymous)], │ onocspresponse: [Function: onocspresponse], │ onnewsession: [Function: onnewsessionclient], │ onerror: [Function: onerror], │ [Symbol(owner_symbol)]: [Circular 3] │ }, │ [Symbol(verified)]: false, │ [Symbol(pendingSession)]: null, │ [Symbol(async_id_symbol)]: 7, │ [Symbol(kHandle)]: null, │ [Symbol(lastWriteQueueSize)]: 0, │ [Symbol(timeout)]: null, │ [Symbol(kBuffer)]: null, │ [Symbol(kBufferCb)]: null, │ [Symbol(kBufferGen)]: null, │ [Symbol(kCapture)]: false, │ [Symbol(kSetNoDelay)]: false, │ [Symbol(kSetKeepAlive)]: false, │ [Symbol(kSetKeepAliveInitialDelay)]: 0, │ [Symbol(kBytesRead)]: 0, │ [Symbol(kBytesWritten)]: 0, │ [Symbol(connect-options)]: { │ rejectUnauthorized: true, │ ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM… │ checkServerIdentity: [Function: checkServerIdentity], │ minDHSize: 1024, │ maxRedirects: 21, │ maxBodyLength: 10485760, │ protocol: 'https:', │ path: null, │ method: 'GET', │ headers: { │ Accept: 'application/octet-stream', │ 'User-Agent': 'hasura-cli' │ }, │ agent: undefined, │ agents: { http: undefined, https: undefined }, │ auth: undefined, │ hostname: 'github.com', │ port: 443, │ nativeProtocols: { 'http:': [Object], 'https:': [Object] }, │ pathname: '/hasura/graphql-engine/releases/download/v2.35.1/cli-hasura-windows-amd64.exe', │ _defaultAgent: Agent { │ _events: [Object: null prototype], │ _eventsCount: 2, │ _maxListeners: undefined, │ defaultPort: 443, │ protocol: 'https:', │ options: [Object: null prototype], │ requests: [Object: null prototype] {}, │ sockets: [Object: null prototype], │ freeSockets: [Object: null prototype] {}, │ keepAliveMsecs: 1000, │ keepAlive: false, │ maxSockets: Infinity, │ maxFreeSockets: 256, │ scheduling: 'lifo', │ maxTotalSockets: Infinity, │ totalSocketCount: 1, │ maxCachedSessions: 100, │ _sessionCache: [Object], │ [Symbol(kCapture)]: false │ }, │ host: 'github.com', │ noDelay: true, │ servername: 'github.com', │ _agentKey: 'github.com:443:::::::::::::::::::::', │ encoding: null, │ singleUse: true │ } │ }, │ _header: 'GET /hasura/graphql-engine/releases/download/v2.35.1/cli-hasura-windows-amd64.exe HTTP/1.1\r\n' + │ 'Accept: application/octet-stream\r\n' + │ 'User-Agent: hasura-cli\r\n' + │ 'Host: github.com\r\n' + │ 'Connection: close\r\n' + │ '\r\n', │ _keepAliveTimeout: 0, │ _onPendingData: [Function: nop], │ agent: Agent { │ _events: [Object: null prototype] { │ free: [Function (anonymous)], │ newListener: [Function: maybeEnableKeylog] │ }, │ _eventsCount: 2, │ _maxListeners: undefined, │ defaultPort: 443, │ protocol: 'https:', │ options: [Object: null prototype] { noDelay: true, path: null }, │ requests: [Object: null prototype] {}, │ sockets: [Object: null prototype] { │ 'github.com:443:::::::::::::::::::::': [ [TLSSocket] ] │ }, │ freeSockets: [Object: null prototype] {}, │ keepAliveMsecs: 1000, │ keepAlive: false, │ maxSockets: Infinity, │ maxFreeSockets: 256, │ scheduling: 'lifo', │ maxTotalSockets: Infinity, │ totalSocketCount: 1, │ maxCachedSessions: 100, │ _sessionCache: { map: {}, list: [] }, │ [Symbol(kCapture)]: false │ }, │ socketPath: undefined, │ method: 'GET', │ maxHeaderSize: undefined, │ insecureHTTPParser: undefined, │ path: '/hasura/graphql-engine/releases/download/v2.35.1/cli-hasura-windows-amd64.exe', │ _ended: false, │ res: null, │ aborted: false, │ timeoutCb: null, │ upgradeOrConnect: false, │ parser: null, │ maxHeadersCount: null, │ reusedSocket: false, │ host: 'github.com', │ protocol: 'https:', │ _redirectable: [Circular *4], │ [Symbol(kCapture)]: false, │ [Symbol(kBytesWritten)]: 0, │ [Symbol(kEndCalled)]: true, │ [Symbol(kNeedDrain)]: false, │ [Symbol(corked)]: 0, │ [Symbol(kOutHeaders)]: [Object: null prototype] { │ accept: [ 'Accept', 'application/octet-stream' ], │ 'user-agent': [ 'User-Agent', 'hasura-cli' ], │ host: [ 'Host', 'github.com' ] │ }, │ [Symbol(kUniqueHeaders)]: null │ }, │ _currentUrl: 'https://github.com/hasura/graphql-engine/releases/download/v2.35.1/cli-hasura-windows-amd64.exe', │ [Symbol(kCapture)]: false │ }, │ response: undefined, │ isAxiosError: true, │ toJSON: [Function: toJSON] │ } │ Node.js v18.12.0 └─ Failed in 22.4s at F:\Mern Stack Projects\mern-video-streaming\server\node_modules.pnpm\hasura-cli@2.35.1\node_modules\hasura-cli  ELIFECYCLE  Command failed with exit code 1.

jjangga0214 commented 10 months ago

Hi! Thank you for the reporting!

This is weird. May I ask three questions?

  1. Is this reproducible when you try reinstalling it?
  2. Is this reproducible from another computer?
  3. Is this reproducible from another network environment?

Thanks!

RamanSharma100 commented 10 months ago

Hello @jjangga0214 ,

Thank you for reply!

Actually issue got resolved, i just reinstalled node by removing all global dependencies