You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note how --arg=value is missing from process.argv.
Expected Behavior
--arg=value must be present in process.argv. It works properly if invoked from cmd (rather than PowerShell):
PS C:\temp\cli-test> cmd
Microsoft Windows [Version 10.0.22631.3527]
(c) Microsoft Corporation. All rights reserved.
C:\temp\cli-test>npm start -- command --arg=value
> [email protected] start
> node index.js command --arg=value
[
'C:\\Program Files\\nodejs\\node.exe',
'C:\\temp\\cli-test\\index.js',
'command',
'--arg=value'
]
It also works as expected under previous versions of Node v21.7.3 and NPM v10.5.0 and the same version of PowerShell v7.4.2.
Steps To Reproduce
See above in "Current Behavior".
Environment
npm: 10.6.0
Node.js: 22.0.0
OS Name: Windows 11 23H2 Build 22631.3527
System Model Name:
npm config:
; "builtin" config from C:\Users\User\AppData\Roaming\npm\node_modules\npm\npmrcprefix = "C:\\Users\\User\\AppData\\Roaming\\npm"; node bin location = C:\Program Files\nodejs\node.exe; node version = v22.0.0; npm local prefix = C:\temp\cli-test; npm version = 10.6.0; cwd = C:\temp\cli-test; HOME = C:\Users\User; Run `npm config ls -l` to show all defaults.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
process.argv
is missing CLI arguments.Using Node.js v22.0.0, NPM v10.6.0 and PowerShell v7.4.2 on Windows 11.
package.js:
index.js:
Running it from a PowerShell prompt:
Note how
--arg=value
is missing fromprocess.argv
.Expected Behavior
--arg=value
must be present inprocess.argv
. It works properly if invoked fromcmd
(rather than PowerShell):It also works as expected under previous versions of Node v21.7.3 and NPM v10.5.0 and the same version of PowerShell v7.4.2.
Steps To Reproduce
See above in "Current Behavior".
Environment
The text was updated successfully, but these errors were encountered: