Skip to content

[BUG] NPX + Powershell + Silent passes no arguments to the application #6366

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
2 tasks done
mxmauro opened this issue Apr 15, 2023 · 2 comments
Closed
2 tasks done
Labels
Bug thing that needs fixing platform:windows is Windows-specific Release 9.x work is associated with a specific npm 9 release

Comments

@mxmauro
Copy link

mxmauro commented Apr 15, 2023

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Assuming I have an app which does the following

console.log(process.argv.slice(2));

And I want to run it without progress bar and no NPM output:

npm --silent --no-progress exec myapp -- some-parameter or
npx --silent --no-progress myapp some-parameter

If I run the command above under Windows PowerShell, the output is:

[]

NOTES:

  • It works fine under CMD.EXE and on Linux.
  • It works fine, including on PowerShell, if I remove the no-progress and silent parameters.

Expected Behavior

[ "some-parameter" ]

Steps To Reproduce

No response

Environment

npm config ls

npm info using [email protected]
npm info using [email protected]
; "user" config from C:\Users\XXX\.npmrc

@OWNER:registry = "https://npm.pkg.github.com/"
//npm.pkg.github.com/:_authToken = (protected)
//prefix = "...."
//registry.npmjs.org/:_authToken = (protected)
access = "public"
loglevel = "info"

; node bin location = C:\Lenguaje\NodeJS\node.exe
; node version = v16.16.0
; npm local prefix = (protected)
; npm version = 9.6.4
; cwd = (protected)
; HOME = (protected)

On Linux I tested with:

- npm: v9.5.1
- Node.js: v18.16.0
@mxmauro mxmauro added Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release labels Apr 15, 2023
@lukekarrys lukekarrys added platform:windows is Windows-specific and removed Needs Triage needs review for next steps labels May 14, 2024
@mbtools
Copy link
Contributor

mbtools commented May 13, 2025

Closed by #8278 (semver 7.7.2)

@alexsch01
Copy link
Contributor

@mbtools I can't reproduce this issue on recent npm versions so I don't think my PR addresses this

to the author of the issue - please open a new issue if you experience this under supported NodeJS / NPM versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing platform:windows is Windows-specific Release 9.x work is associated with a specific npm 9 release
Projects
None yet
Development

No branches or pull requests

5 participants