Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install from npmmirror.com failed (302 redirect) #302

Closed
GongT opened this issue Sep 4, 2023 · 1 comment · Fixed by #341
Closed

install from npmmirror.com failed (302 redirect) #302

GongT opened this issue Sep 4, 2023 · 1 comment · Fixed by #341

Comments

@GongT
Copy link

GongT commented Sep 4, 2023

env

nodejs docker image tag: latest (v20.5.1)

run

corepack pnpm i

COREPACK_NPM_REGISTRY="https://registry.npmmirror.com"

Internal Error: Server answered with HTTP 302 when performing the request to https://registry.npmmirror.com/pnpm/-/pnpm-8.7.1.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
    at ClientRequest.<anonymous> (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:38889:21)
    at Object.onceWrapper (node:events:[62](http://gitlab.moffett.local/softwareteam/infra/sparse-playground-service/-/jobs/31791#L62)9:26)
    at ClientRequest.emit (node:events:514:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:693:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
    at TLSSocket.socketOnData (node:_http_client:535:22)
    at TLSSocket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:343:12)
    at readableAddChunk (node:internal/streams/readable:316:9)
    at Readable.push (node:internal/streams/readable:253:10)
@GongT GongT changed the title install from npmmirror.com failed install from npmmirror.com failed (302 redirect) Sep 4, 2023
@arcanis
Copy link
Contributor

arcanis commented Sep 4, 2023

We don't follow redirects. If you want to implement it, that's the place that should be updated:

https://github.com/nodejs/corepack/blob/main/sources/httpUtils.ts#L16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants