Skip to content

Windows WinGet configuration failures (Failed to create instance: -2147023174) #66755

Closed as not planned

Description

@MikeMcC399

Situation

The BUILDING > Windows Prerequisites documentation section 2: Automated install with WinGet describes using the .configurations files to install prerequisites on Microsoft Windows required for building Node.js.

The instructions say to use a PowerShell terminal, and do not specify if elevated (Admin) privileges are necessary.

If the configuration is run without Admin privileges, it fails to install Visual Studio:

VSComponents [vsComponents]
Loading the module for the configuration unit failed because it requires administrator privileges to run.

If the configuration is run with Admin privileges, it fails to determine the current state:

The configuration unit failed while attempting to test the current system state.
Failed to create instance: -2147023174

This error condition is also noted in issue microsoft/winget-cli#6560

Steps to reproduce

On Windows 11 26H2:

From Windows Settings > Apps > Installed Apps delete any of:

  • Git
  • Microsoft Visual Studio Installer
  • Python
  • Python Installer
  • Python Launcher
  • Rust

Delete:

  • C:\Python* if found
  • C:\Program Files\NASM

Restart system

In a PowerShell 7 terminal window, execute:

git clone https://github.com/nodejs/node
cd node
winget configure .\.configurations\configuration.vsBuildTools.dsc.yaml

Logs

Microsoft Windows NT 10.0.26300.0 x64
Windows 11 26H2 (OS Build 26300.9711)
PowerShell 7.6.7
winget v1.29.380

PowerShell non-Admin

WinGetPackage [pythonPackage]
  Unit successfully applied.
WinGetPackage [vsPackage]
  Unit successfully applied.
VSComponents [vsComponents]
  Loading the module for the configuration unit failed because it requires administrator privileges to run.
WinGetPackage [rustPackage]
  Unit successfully applied.
WinGetPackage [gitPackage]
  Unit successfully applied.
WinGetPackage [nasmPackage]
  Unit successfully applied.
Some of the configuration was not applied successfully.

PowerShell Administrator

WinGetPackage [pythonPackage]
  The configuration unit failed while attempting to test the current system state.
Failed to create instance: -2147023174
<See the log file for additional details>
WinGetPackage [vsPackage]
  The configuration unit failed while attempting to test the current system state.
Failed to create instance: -2147023174
<See the log file for additional details>
WinGetPackage [rustPackage]
  The configuration unit failed while attempting to test the current system state.
Failed to create instance: -2147023174
<See the log file for additional details>
WinGetPackage [gitPackage]
  The configuration unit failed while attempting to test the current system state.
Failed to create instance: -2147023174
<See the log file for additional details>
WinGetPackage [nasmPackage]
  The configuration unit failed while attempting to test the current system state.
Failed to create instance: -2147023174
<See the log file for additional details>
VSComponents [vsComponents]
  This configuration unit was not run because a dependency failed or was not run.
Some of the configuration was not applied successfully.

Suggestion

Activity

  1. added
    docIssues and PRs related to Node.js documentation.
    windowsIssues and PRs related to the Windows platform.
    installIssues and PRs related to installing Node.js and its installers.
    on Oct 15, 2026
  2. rahimuddin140 commented on Oct 16, 2026

    @rahimuddin140

    Hi, I noticed the BUILDING.md Windows Prerequisites section says to run the .configurations files in a PowerShell terminal but never mentions whether elevated (Admin) privileges are needed. Without admin, the VSComponents unit fails for lack of privileges; with admin, it fails with 'Failed to create instance: -2147023174'. I'd like to clarify this in the docs — would a PR be welcome?

  3. MikeMcC399 commented on Oct 16, 2026

    @MikeMcC399
    ContributorAuthor

    @rahimuddin140

    Until the background for this issue is clarified, there should be no change to documentation.

  4. MikeMcC399 commented on Oct 16, 2026

    @MikeMcC399
    ContributorAuthor

    The error message "Failed to create instance: -2147023174" using an Administrator PowerShell terminal is not generally reproducible on Windows 11 26H2. This problem seems to be the result of Windows Update / Microsoft Store update issues on one isolated system.

    Although the linked issue microsoft/winget-cli#6560 describes an instance where this error message is output, the scenario is different.

    On a clean install of Windows 11 26H2 I am able to execute winget configure .\.configurations\configuration.vsBuildTools.dsc.yaml successfully to install a full configuration including Python 3.14.

    Closing this issue. I will follow up with an update PR for winget to install Python 3.15 instead of Python 3.14, after successful testing of the proposed new configuration. This is non-urgent, since all release lines continue to support the use of Python 3.14.

    Python 3.15 is not yet available as a winget package:

    winget search --id Python.Python

    Note that an incomplete installation, caused by running winget configure in a non-elevated PowerShell terminal, can be completed by repeating the command in an Administrator PowerShell terminal.

    Edit: on the Windows 11 26H2 PC that was failing, I was only able to recover after I had reset the PC - in other words, reinstall of Windows wiping out all user settings. I was unable to find any other easy way to get it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.installIssues and PRs related to installing Node.js and its installers.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions