phero icon indicating copy to clipboard operation
phero copied to clipboard

CLI: crashes without internet connecton

Open kamilafsar opened this issue 2 years ago • 0 comments

Running phero without internet connection leads to a crash:

/Users/kamilafsar/Projects/phero/packages/cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: getaddrinfo ENOTFOUND registry.npmjs.org
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
Emitted 'error' event on ClientRequest instance at:
    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) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'registry.npmjs.org'
}

I guess this is because we do this version checking before running the actual command. Maybe make an separate command for this.

kamilafsar avatar Feb 18 '23 09:02 kamilafsar