nodejs / nodejs/corepack

corepack disable incorrectly deletes original package manager

Open
#112 9 comments 13 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

Running with Node.js v16.15.0 on macOS

npm --version   # 8.5.5
pnpm --version  # command not found

npm i -g pnpm@7.1.6
pnpm --version  # 7.1.6

echo '{"packageManager": "pnpm@6.32.18"}' > package.json
corepack enable pnpm
pnpm --version  # 6.32.18

corepack disable pnpm
pnpm --version  # command not found

I would expected corepack disable pnpm to revert to the previous global install of 7.1.6

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

Start by reproducing the documented sequence with Node.js 16.15.0 on macOS: install pnpm globally, run corepack enable pnpm, then corepack disable pnpm. Trace the disable path and verify that the previous global pnpm installation remains available after disabling Corepack.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.