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
run-many appends a "--" argument when invoking packages' scripts #10111
Comments
I am getting the same issue. Is there any easy fix or walk around? |
I couldn't find any 😅 |
I worked around it by simply adding an |
PNPM recently released V7, which changed some behavior about the argument. npm install -g pnpm@latest-6 not sure is this PR pnpm/pnpm#4290 caused the issue 🤔 |
Starting in pnpm v7 all command line arguments after the script name are passed to a script's arguments when using `pnpm run <script>`, including `--`. This can cause problems when there are no command line arguments, because it will pass `--` without anything following, which some scripts can't handle. In order to preserve the old functionality, we check if the pnpm version is less than 7.0.0. If it is, we include `--` before the args, otherwise we don't. Closes nrwl#10111
I have the exact same issue/setup (pnpm v7), but for me it is triggered from a |
@melMass I just created a PR to fix this, so maybe you can hold on for a little longer. :) |
Starting in pnpm v7 all command line arguments after the script name are passed to a script's arguments when using `pnpm run <script>`, including `--`. This can cause problems when there are no command line arguments, because it will pass `--` without anything following, which some scripts can't handle. In order to preserve the old functionality, we check if the pnpm version is less than 7.0.0. If it is, we include `--` before the args, otherwise we don't. Closes nrwl#10111
Ahhh thanks, reading you PR I actually realize I misinterpreted the issue. |
Starting in pnpm v7 all command line arguments after the script name are passed to a script's arguments when using `pnpm run <script>`, including `--`. This can cause problems when there are no command line arguments, because it will pass `--` without anything following, which some scripts can't handle. In order to preserve the old functionality, we check if the pnpm version is less than 7.0.0. If it is, we include `--` before the args, otherwise we don't. Closes #10111
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
In a monorepo where each package has a
tsc
script to run the Typescript checker, when I runtsc
through Nx using this command:Nx appends
--
when it invokes the scripts, and that results in the following error:Expected Behavior
I'd expect Nx to invoke the script as it is declared in the
package
without appending additional arguments.Steps to Reproduce
pnpm install
.pnpm run tsc
Failure Logs
The code is included above
Environment
The text was updated successfully, but these errors were encountered: