Visitar URL original
pnpm 12 rejects `--cache-dir` · Issue #17422 · pnpm/pnpm · GitHub
Skip to content

pnpm 12 rejects --cache-dir #17422

Closed

Description

@onmax

Last pnpm version that worked

11.28.8

pnpm version

12.15.0

Code to reproduce the issue

pnpm install --cache-dir /tmp/pnpm-cache

Expected behavior

The install uses /tmp/pnpm-cache as its cache, as it does on pnpm 11.

Actual behavior

error: unexpected argument '--cache-dir' found

  tip: a similar argument exists: '--state-dir'

Additional information

pnpm install --config.cache-dir=/tmp/pnpm-cache works, so only the bare flag is missing. cache-dir isn't in BARE_SETTING_FLAGS in pnpm/crates/cli/src/config_overrides/tokens.rs, the list added for #14281.

Node.js version

24.21.0

Operating System

Linux

Activity

  1. github-actions commented on Oct 27, 2026

    @github-actions
    Contributor

    @onmax, are you planning to open a pull request for this? If so, reply here and a maintainer will assign the issue to you, so nobody else starts on the same fix.

  2. shahinsamiur commented on Oct 27, 2026

    @shahinsamiur
    Contributor

    I would like to look into this problem. I will work on parsing of the argument and apply a basic fix along with writing some regression tests to check for the correct functioning of --cache-dir.

  3. zkochan commented on Oct 27, 2026

    @zkochan
    Member

    assigned the issue to @shahinsamiur.

  4. added a commit that references this issue on Oct 27, 2026
    4201601
  5. added a commit that references this issue on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions