nodejs / nodejs/corepack

Error when performing the request

Open
#332 4 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.8k
Forks
279
Avg merge
1h 47m
Merged PRs (30d)
2

Description

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'
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with pnpm --version and yarn --version, then compare the terminal request with the browser and curl results. Read the request handling around dist/lib/corepack.cjs and the reported ClientRequest stack, including the UNABLE_TO_GET_ISSUER_CERT_LOCALLY error. Done means the package-manager version commands complete successfully or report a clear, actionable certificate failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.