nodejs / nodejs/corepack

Cannot bypass "Corepack is about to download" prompt

Open
#550 3 comments 3 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

I'm trying to run corepack inside devcontainers, in a postCreateCommand.

I've upgraded corepack to latest:

npm install --yes --global corepack@latest

Then run:

corepack -v && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable

The output I get:

0.29.3
! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-9.7.1.tgz
? Do you want to continue? [Y/n] 

I've tried setting CI too, but also does not work.

Any clues?

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 reported devcontainer sequence: install corepack@latest, then run corepack -v && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable, with and without CI. Trace the handling of COREPACK_ENABLE_DOWNLOAD_PROMPT and verify that corepack enable completes without the download prompt when the variable is set.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.