Skip to content

Invalid "bin" field fails install with EISDIR: illegal operation on a directory, read #9441

@backbone87

Description

@backbone87

Verify latest release

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

pnpm version

10.8.1

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

No response

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

No response

Reproduction steps

  • Create a package where the package.json's bin field points to a directory
  • Add this package as a dep in another package
  • Run pnpm install

Describe the Bug

Invalid values in the bin field of package.json fails to install with EISDIR: illegal operation on a directory, read. Afaik packageExtensions can not be used to "fix" this field.

Expected Behavior

Invalid values in the bin field are ignored/warned and do not fail the installation (like yarn and npm).

Which Node.js version are you using?

^20

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions