8000 monorepo root .bin executable not working from workspace package directory · Issue #4858 · pnpm/pnpm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

monorepo root .bin executable not working from workspace package directory #4858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sbonasu opened this issue Jun 5, 2022 · 1 comment · Fixed by #9522
Closed

monorepo root .bin executable not working from workspace package directory #4858

sbonasu opened this issue Jun 5, 2022 · 1 comment · Fixed by #9522

Comments

@sbonasu
Copy link
sbonasu commented Jun 5, 2022

monorepo root .bin executable not working when run from workspace package directory if ignore-scripts=true is set in .npmrc. One of my requirement for pnpm migration is to not run scripts due to supply chain attacks.

Works as expected if I remove ignore-scripts=true

pnpm version:
7.1.7
Code to reproduce the issue:

Sample monorepo:

Example:
--package.json
--node_modules/
--shared/
    |--client/
       |--package.json
       |--node_modules/
    |--server/
       |--package.json
       |--node_modules/

lets say there is a executable in root node_modules/.bin called app
node_modules/.bin/app

pnpm app works from root directory. If I go to shared/client and run pnpm app it doesn't work - I get error
 ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  not found: app

Expected behavior:
monorepo root executables should work from anywhere when ignore-scripts=true is set.

Actual behavior:
monorepo root executables do NOT work except from root directory when ignore-scripts=true is set

Additional information:

node -v
v16.15.1

macOS

@sbonasu
Copy link
Author
sbonasu commented Jun 10, 2022

can someone please look in to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0