Repository navigation
Description
What is the problem this feature will solve?
Windows users are concerned by the check box in the installer (#30242) - why not remove the external dependency?
Chocolatey is an independent, open core (with proprietary extensions), package manager for Windows that recreates existing functionality included in all current versions of Windows. Chocolatey has its own set of problems, mostly stemming from the independent partially closed source for profit nature of the project.
What is the feature you are proposing to solve the problem?
winget is an open source package manager from Microsoft and is installed by default on modern versions of Windows. It has all the packages that Chocolatey wants to install.
This is equivalent to the checkbox, with newer package versions, and without Chocolatey:
winget install -e --id Python.Python.3.12
winget install -e --id Microsoft.VisualStudio.2022.Community --override "--passive --wait --add Microsoft.VisualStudio.Workload.VCTools"What alternatives have you considered?
WiX Toolset, which is already in use, might have all the capabilities necessary to install these optional dependencies without using any PowerShell scripts.
Additional Resources
- I've created a trivial program to test if native addons' dependencies are installed and working.
- https://github.com/nodejs/node-gyp#on-windows
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsAwaiting Triage
Activity
aduh95 commentedon Mar 2, 2024
The issue is that the Windows installer suggests to install Chocolatey, correct? If someone sends a PR to use a different package manager, it seems likely to me that it'd be accepted.
cinderblock commentedon Mar 5, 2024
That seems correct to me. Most other installers I've used don't install some other tool to install more optional tools.
I guess there isn't really a reason to depend on
wingeteither. In my experience, usually installers with optional features give a more detailed drop down that allows users to opt in to each set of optional features directly - no external tooling necessary.I'm thinking something like this:

Looking at the code, there are only a couple references to "chocolatey". It should be easy enough to replace/update install_tools.bat to use
winget- but maybe something higher level in the installer configuration would look better - maybe a user wants to use some existing python binary and to use gcc instead of VCTools (getting node-gyp to support that flexibility is outside the scope of this change) or different versions of Visual Studio.Daverd-GM commentedon Jul 12, 2024
don't know if this is the right place but also the chocolatey script for installing the build tools is outdated for node 22 because it still installs the vs2019 tools
cinderblock commentedon Jul 23, 2024
I'm wondering if the best solution for this is to use WiX Toolset's features directly. I suspect it would be possible for it to download and install the necessary tools (with the same check box) without the PowerShell script.
However, I'm not very familiar with the WiX Toolset and am not sure quite where to start, or even how to test it...
Does anyone have a opinions on keeping the PowerShell script and changing it to use
wingetvs using WiX Toolset to directly install the optional dependencies? Can someone speak to if WiX Toolset supports installing optional dependencies like this?Edit: StackOverflow seems to suggest using a "Burn".
nemchik commentedon Jul 23, 2024
No idea about WiX, but I like the idea of
winget. I believe Win10 does not includewingetby default, so it would need to be installed. I think (not positive) Win11 does includewingetout of the box.avivkeller commentedon Sep 13, 2024
Windows 11 does include winget by default, AFAIK
avivkeller commentedon Sep 13, 2024
Also, FWIW i think the following will work:
I haven't tested it tho.
Diff
cinderblock commentedon Sep 16, 2024
While the comments reference
NASM, thechoco update ...doesn't reference NASM... (nor git). We shouldn't be adding other dependencies, imho.@redyetidev Why the
--passiveand--wait?If you want to try it, push a PR (or fork and push to your own repo). The GitHub Actions will build a whole installer with the new script and you can test it.
avivkeller commentedon Sep 16, 2024
I'd wait until winget comes standard with all builds
cinderblock commentedon Sep 16, 2024
WinGet is (apparently) installed by default on recent versions of Windows 10... What more would you wait for?
I'm personally more partial to using WiX directly as that seems to align more with Windows standards that I'm familiar with.
avivkeller commentedon Sep 16, 2024
Well, that's just my opinion
@nodejs/platform-windows WDYT
github-actions commentedon Mar 16, 2025
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the never-staleIssues and PRs exempt from automated stale handling.
label or close this issue if it should be closed. If not, the issue will be automatically closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
cinderblock commentedon Mar 17, 2025
saper commentedon Apr 10, 2025
I just tried it - I am not sure if
--passiveworks at all, as the command pops up a bigvs_setup_bootstrap.exepopup. Without--waitwinget will exit after a while once the vs_setup is running.cinderblock commentedon Apr 11, 2025
saper commentedon Apr 14, 2025
I think docs for WinGet install are for winget itself, the
--overrideoption passes--passiveand--waitto the Visual Studio setup bootstrapper, which does it ... differently.I can confirm that
--passivepops up a GUI dialog that displays progress (can be useful as it takes quite a long time to get and install everything).--waitcauses the bootstrapper to wait until the whole setup is complete to return an exit code and not return early to the invoking process.https://learn.microsoft.com/en-us/visualstudio/install/command-line-parameter-examples?view=vs-2022#using---wait
cinderblock commentedon Apr 15, 2025
Ah. Thank you. I'd missed that.
Trying the command myself, I'm getting errors when I run it again. Is this not idempotent?
saper commentedon Apr 15, 2025
You need to make sure no Visual Studio bootstrapper or setup running while re-running this. But I am guessing here.
Ideally, we should get a free software toolchain to build this thing :(
cinderblock commentedon Apr 16, 2025
Curious... My two Windows 11 systems are behaving slightly differently, but both give a non-zero exit code.
At home, it doesn't even launch the Visual Studio Installer gui.
At work, it downloads a binary, launches a gui that quickly gets to 100%, and closes but then shows a basic error message in the terminal.
I have dreams of replacing node-gyp as the defacto native build tool for Node.js. Still confused how we ended up with a Python based build tool as the apparently recommended option for Node.js.
bnoordhuis commentedon Apr 17, 2025
Because node-gyp is a wrapper around gyp, which is also the build tool for node.js itself, and that's a python project. Various JS ports exist but never got much traction.
tekowalsky commentedon Jul 4, 2026
For awareness, this is installing the "free" version of Chocolatey which uses the "community" repository.
The Chocolatey Software 'Security' page strongly recommends organizations (and security conscious individuals) should not use the "community" repository.
"Most organizations using Chocolatey do NOT use the community repository, and Chocolatey Software using the community repository either for organizational deployments for a variety of reasons."
"When you use Chocolatey in an organizational sense, do so in a manner that requires no internet access. Chocolatey doesn’t require internet access at all."
"t goes without stating that if you are a business and you are using Chocolatey, you should think long and hard before trusting an external source you have no control over (community.chocolatey.org packages, in addition to all of the binaries that download from official distribution channels over the internet)."
"Organizations typically do not use the community repository anyway and only use Chocolatey in a completely secure manner."