-
Notifications
You must be signed in to change notification settings - Fork 176
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
use COREPACK_NPM_REGISTRY but throw Internal Error: Server answered with HTTP 301 when performing the request #336
Comments
Taobao registry will redirect and return with 302; It will cause corepack error; [exec] Internal Error: Server answered with HTTP 302
[exec] at ClientRequest.<anonymous> (/home/ndp-soft/node-v16.20.1-linux-x64/lib/node_modules/corepack/dist/corepack.js:43949:23)
[exec] at Object.onceWrapper (node:events:628:26)
[exec] at ClientRequest.emit (node:events:513:28)
[exec] at HTTPParser.parserOnIncomingClient (node:_http_client:693:27)
[exec] at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
[exec] at TLSSocket.socketOnData (node:_http_client:534:22)
[exec] at TLSSocket.emit (node:events:513:28)
[exec] at addChunk (node:internal/streams/readable:315:12)
[exec] at readableAddChunk (node:internal/streams/readable:289:9)
[exec] at TLSSocket.Readable.push (node:internal/streams/readable:228:10) Source code in here: I think return 302 should be allowed? Can anyone change this logic? or PR? |
Corepack doesn't support redirections. We welcome PRs. |
hi, I made a PR for support redirections. |
I run
COREPACK_NPM_REGISTRY=https://registry.npm.taobao.org corepack prepare pnpm@latest-8 --activate
but it throw the error
Internal Error: Server answered with HTTP 301 when performing the request to https://registry.npm.taobao.org/pnpm; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
The text was updated successfully, but these errors were encountered: