Skip to content

Regression: pnpm 11.x on Windows installs self-update into global/v11 but does not update bootstrap loader in %LOCALAPPDATA%\pnpm #11464

@onemen

Description

@onemen

Last pnpm version that worked

10.33.2

pnpm version

11.0.3, 11.0.4, 11.0.5

Code to reproduce the issue

On Windows 11:

When using version 11.0.3
pnpm -v --> 11.0.3

# Start with pnpm 11.0.3 or 11.0.5 installed via .tools layout
pnpm self-update 11.0.4

or

pnpm self-update 11.0.5

Expected behavior

  • pnpm should install the target version into:
%LOCALAPPDATA%\pnpm\.tools\pnpm\<version>
  • pnpm should update the bootstrap loader:
%LOCALAPPDATA%\pnpm\pnpm
%LOCALAPPDATA%\pnpm\pnpm.cmd

so that pnpm --version reflects the newly installed version.

This is the behavior in pnpm 10.33.2.

Actual behavior

  • pnpm installs the new version into:
%LOCALAPPDATA%\pnpm\global\v11\<version>

now pnpm installed in 2 places, the version before updating is in .tools (lines 1-2), the 2nd is in global/v11 (lines 3-4)

where.exe pnpm                                                                                                                     ─╯
C:\Users\Hadar\AppData\Local\pnpm\pnpm
C:\Users\Hadar\AppData\Local\pnpm\pnpm.CMD
C:\Users\Hadar\AppData\Local\pnpm\bin\pnpm
C:\Users\Hadar\AppData\Local\pnpm\bin\pnpm.CMD
  • The bootstrap loader in:
%LOCALAPPDATA%\pnpm\pnpm
%LOCALAPPDATA%\pnpm\pnpm.cmd

still points to the old .tools version (e.g. 11.0.3).

  • Running pnpm --version continues to show the old version.

  • pnpm does not update the loader or switch to the new version.

  • The only way to update correctly is to manually run the 10.33.2 bootstrap:

node %LOCALAPPDATA%\pnpm\.tools\pnpm\10.33.2\node_modules\pnpm\bin\pnpm.cjs self-update 11.0.5

which installs into .tools and updates the loader correctly.

Additional information

  • This regression affects all pnpm 11.x versions when upgrading from .tools layout.
  • pnpm 11.x partially migrated to the new global/v11 layout, but the bootstrap loader update logic was not migrated.
  • As a result, pnpm installs the new version but never switches to it.

Node.js version

24.15.0

Operating System

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions