"corepack prepare yarn@3.4.1 --activate" results in "Internal Error: Server answered with HTTP 503"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 279
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
I'm using this with Jenkins on AWS.
- I set up Node to the version (v16.15.1) set in .nvmrc file:
if (fileExists('.nvmrc')) {
sh 'bash -l -c "(((nvm install > /dev/null) && nvm use) && nvm alias default node) || true"'
}
- Then check if corepack is available and if not install it; then enable corepack and try to install yarn@3.4.1 (the same version is specified in package.json as the "packageManager": "yarn@3.4.1" property
sh "bash -l -c '(corepack --version || npm i -g corepack) && corepack enable && corepack prepare yarn@3.4.1 --activate'"
However, the last step (corepack prepare yarn@3.4.1 --activate) fails producing the following error message:
16:14:42 Internal Error: Server answered with HTTP 503
16:14:42 at ClientRequest.<anonymous> (/usr/local/nvm/versions/node/v16.15.1/lib/node_modules/corepack/dist/corepack.js:3933:31)
16:14:42 at Object.onceWrapper (node:events:642:26)
16:14:42 at ClientRequest.emit (node:events:527:28)
16:14:42 at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:631:27)
16:14:42 at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
16:14:42 at TLSSocket.socketOnData (node:_http_client:494:22)
16:14:42 at TLSSocket.emit (node:events:527:28)
16:14:42 at addChunk (node:internal/streams/readable:315:12)
16:14:42 at readableAddChunk (node:internal/streams/readable:289:9)
16:14:42 at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
I ran the command individually, so I can confirm that it is the last one that produces the error.
Please, help.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing corepack prepare yarn@3.4.1 --activate with Node v16.15.1, using the Jenkins command and package.json packageManager value from the report. Inspect the failure location in dist/corepack.js around line 3933 and determine why the HTTP 503 occurs in this AWS/Jenkins setup. Done means the cause and expected behavior are established, with a verified correction or documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, nodejs, typescript
- Domain
- cli, cloud, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100