Skip to content

pnpm setup fails after install on Windows #14618

Description

@TwoSquirrels

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

No response

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

On Windows, install pnpm with the standalone script, then run pnpm setup

$env:PNPM_VERSION="latest-12"; Invoke-WebRequest https://get.pnpm.io/install.ps1 -UseBasicParsing | Invoke-Expression
pnpm -v # 12.3.4
pnpm setup

Describe the Bug

pnpm setup fails:

Installing pnpm CLI globally from C:\Users\user\AppData\Local\pnpm\global\v11\557a16cc51f818d142da6cabdc92990972c46d60721da61794cda49f5c7e27d2\node_modules\@pnpm\exe

Error: ERR_PNPM_DIRECTORY_FETCHER_PATH_ESCAPE

  × adding a new package
  ╰─▶ path C:
      \Users\user\AppData\Local\pnpm\global\v11\557a16cc51f818d142da6cabdc92990972c46d60721da61794cda49f5c7e27d2\node_modules\@pnpm\exe resolves outside source directory C:
      \Users\user\AppData\Local\pnpm\global\v11\557a16cc51f818d142da6cabdc92990972c46d60721da61794cda49f5c7e27d2\node_modules\@pnpm\exe

Error:   × Failed to install pnpm globally (exit code 1)

Expected Behavior

pnpm setup succeeds.

Which Node.js version are you using?

24.19.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Activity

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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions