pnpm: pnpm install recursive fails with `bin` in sub package that must be compiled first

pnpm version:

v3.2.0

Code to reproduce the issue:

See https://github.com/hgossler/pnpm-issue-1801 and follow the steps in the readme. This fails because pnpm attempts to chmod the bin in sub-package1 before the prepare script is run.

Expected behavior:

pnpm i -r should work.

Actual behavior:

 ERROR  ENOENT: no such file or directory, chmod '... /pnpm-issue-2/packages/sub-package2/node_modules/sub-package1/dist/script.js'

It works if you run

cd packages/sub-package1
pnpm i

first.

Additional information:

  • node -v prints: v11.10.1
  • Windows, OS X, or Linux?: macOS

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 6
  • Comments: 20 (4 by maintainers)

Commits related to this issue

Most upvoted comments

In case it’s helpful, I did similar in my Github workflows.

      - name: pnpm - output bin stubs
        run: echo "#! /usr/bin/env node" > ./packages/presta/cli.js
      - name: pnpm - install
        run: pnpm install

also still present in 6.24.3

I just ran into this issue and submitted a PR for the underlying library (see above) which would fix it 🤞🏻

So, any project that uses Typescript and monorepo is not able to use PNPM without some kind of workaround. Hmm…

ERROR  ENOENT: no such file or directory, chmod ‘/home/circleci/project/test/node_modules/electron-builder/out/cli/cli.js’