Skip to content

If package.json#bin points to path that doesn't exist, pnpm install errors #3763

@vjpr

Description

@vjpr

I found a package where it pointed the bin to dist, but the dist was generated in a prepare script.

pnpm version: 6.14.6

Code to reproduce the issue:

https://github.com/vjpr/issue-pnpm-cannot-find-realpath

Just run pnpm i

Expected behavior:

No error

Actual behavior:

 ERROR  ENOENT: no such file or directory, chmod '/Users/xxx/dev/code/issue-pnpm-cannot-find-realpath/packages/foo/dist/index.js'

Additional information:

  • node -v prints: 16.7
  • Windows, macOS, or Linux?: macOS + Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions