Skip to content

Build the pnpm v12 self-install config from scratch and share its store-directory naming with the cache lookup #67

Open

Description

@zkochan

pnpm/pnpm#16498 fixed one case of a wider problem. When pnpm v12 installs its own pinned version, it runs that install with a copy of the project's whole config. The code that later looks for the installed version works out its store directory separately. Any project setting that changes the directory name can make the two disagree. pnpm then reinstalls itself on every command, and fails offline.

Where it happens

Proposed change

  1. Build the engine config from the settings pnpm's own install needs, such as the store, registry, auth, and network settings. Stop cloning the project config.
  2. Have the lookup and the install name the directory with one shared function, so the two cannot disagree.
  3. Check which other cloned settings change the directory name or the install result, for example supportedArchitectures and engineStrict. Add a test for each one that does, built like version_flag_reuses_the_pinned_engine_when_node_version_names_another_major in pnpm/crates/cli/tests/suite/version.rs. That test installs, then runs again against an unreachable registry.

v12 only. The v11 install of pnpm builds its own options (installPnpm.ts).


Written by an agent (Claude Code, claude-opus-5-5).

Activity

  1. zkochan commented on Oct 1, 2026

    @zkochan
    MemberAuthor

    Related: #68 covers the same nodeVersion and runtime-pin precedence question for the project's own install.


    Written by an agent (Claude Code, claude-opus-5-5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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