corepack icon indicating copy to clipboard operation
corepack copied to clipboard

Error when performing the request

Open indapublic opened this issue 2 years ago • 4 comments

coreutils is installed by brew, version is 0.23.0

Receive Error when performing the request on each execution of pnpm or yarn.

Internal Error: Error when performing the request to https://registry.npmjs.org/pnpm; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
    at ClientRequest.<anonymous> (/opt/homebrew/Cellar/corepack/0.23.0/libexec/lib/node_modules/corepack/dist/lib/corepack.cjs:42195:14)
    at ClientRequest.emit (node:events:519:28)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
    /tmp  yarn --version                                   1 ✘  15:54:13 
Internal Error: Error when performing the request to https://registry.npmjs.org/yarn; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
    at ClientRequest.<anonymous> (/opt/homebrew/Cellar/corepack/0.23.0/libexec/lib/node_modules/corepack/dist/lib/corepack.cjs:42195:14)
    at ClientRequest.emit (node:events:519:28)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

At same time https://registry.npmjs.org/pnpm and https://registry.npmjs.org/yarn working in browser and by curl in terminal

no vpn or proxy enabled.

Checked #257 #259 #273

ps. Exact error message is

Error: unable to get local issuer certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
    at TLSSocket.emit (node:events:519:28)
    at TLSSocket._finishInit (node:_tls_wrap:1085:8)
    at ssl.onhandshakedone (node:_tls_wrap:871:12) {
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
}

indapublic avatar Dec 04 '23 06:12 indapublic

+1 Is there a way to avoid the request?

KyrieLii avatar Jan 15 '24 07:01 KyrieLii

+1

tofrankie avatar Feb 02 '24 13:02 tofrankie

ps. Exact error message is

Error: unable to get local issuer certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
    at TLSSocket.emit (node:events:519:28)
    at TLSSocket._finishInit (node:_tls_wrap:1085:8)
    at ssl.onhandshakedone (node:_tls_wrap:871:12) {
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
}

That's an error thrown by Node.js, which means the HTTPS certificate is not valid (either because someone is listening to your network traffic, or the version of Node.js you are using does not contain up-to-date cert). You can disable that security as explained in https://nodejs.org/api/cli.html#node_tls_reject_unauthorizedvalue.

Is there a way to avoid the request?

Well no, you need to fetch the software from the network before you can use it.

aduh95 avatar Feb 02 '24 17:02 aduh95