Skip to content

"The target bin directory already contains an exe called node" warning is spammed on many commands #12203

Description

@machadinhos

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

(this may only happen on windows)

  1. go to an empty folder
  2. run pnpm init
  3. run pnpm runtime set node latest
  4. run pnpm update
    the warning [WARN] The target bin directory already contains an exe called node, so removing D:\projects\test\node_modules\.bin\node.EXE will be printed twice to the console.

Describe the Bug

Hi!

Ever since I upgraded to pnpm 11 I started getting the error [WARN] The target bin directory already contains an exe called node, so removing D:\projects\test\node_modules\.bin\node.EXE on a lot of pnpm commands I run when using it to manage the node version being used in the project.

Installing a package with pnpm install or pnpm remove prints this warning once, running pnpm update prints the warning twice, and there are other instances where the warning appears.

It's obviously not a breaking think, but it's annoying and this warning didn't appear in pnpm 10.

This maybe a windows only problem and could also be due to the way I installed pnpm. I installed pnpm via the powershell command Invoke-WebRequest https://get.pnpm.io/install.ps1 -UseBasicParsing | Invoke-Expression, I did not install it via npm.

Is there a way to suppress this warning?

Thank you for any help and for this amazing tool!

Expected Behavior

Remove the warning.

Which Node.js version are you using?

v26.3.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions