Version
24.21.0
Platform
After installing Node.js with the Windows installer, I found a malformed entry in the system PATH:
;C:\Program Files\nodejs
It has a trailing double quote, so it does not point to the Node.js installation directory. The correct entry should be:
C:\Program Files\nodejs\
When a process inherits the malformed entry without the valid one, commands such as npx cannot be resolved, even though npx.cmd is present in the installation directory.
Steps to reproduce
- Install Node.js using the Windows installer.
- Inspect the system
PATH.
- Check whether it contains
;C:\Program Files\nodejs.
- With that entry in the process
PATH, run where.exe npx.
Actual result
where.exe npx cannot find npx, although C:\Program Files\nodejs\npx.cmd exists.
Expected result
The installer should add the correct Node.js directory to PATH without a trailing quote.
Subsystem
No response
What steps will reproduce the bug?
- Check path settings in Windows settings.
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
C:\Program Files\nodejs
What do you see instead?
;C:\Program Files\nodejs
Additional information
No response
Version
24.21.0
Platform
After installing Node.js with the Windows installer, I found a malformed entry in the system
PATH:;C:\Program Files\nodejs
It has a trailing double quote, so it does not point to the Node.js installation directory. The correct entry should be:
C:\Program Files\nodejs\
When a process inherits the malformed entry without the valid one, commands such as
npxcannot be resolved, even thoughnpx.cmdis present in the installation directory.Steps to reproduce
PATH.;C:\Program Files\nodejs.PATH, runwhere.exe npx.Actual result
where.exe npxcannot findnpx, althoughC:\Program Files\nodejs\npx.cmdexists.Expected result
The installer should add the correct Node.js directory to
PATHwithout a trailing quote.Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
C:\Program Files\nodejs
What do you see instead?
;C:\Program Files\nodejs
Additional information
No response