Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa Adatta ai principianti
#66,755 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
shell, yaml

Direzione di ricerca

Inizia da BUILDING.md, nella sezione 'Option 2: Automated install with WinGet', che indica agli utenti Windows di eseguire i file .configurations da PowerShell senza dire se servono i diritti di amministratore. Riproduci le due modalità di errore descritte nell'issue eseguendo winget configure su uno di quei file YAML, con e senza una shell elevata. È completato quando la sezione specifica che il comando deve essere eseguito in un PowerShell elevato e quando l'issue upstream di winget-cli è collegato per l'errore residuo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

doc install windows

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 https://github.com/microsoft/winget-cli/issues/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

Lingua principale
JavaScript
Stelle
122k
Fork
39.9k
Merge medio
3g 22h
PR unite (30g)
235

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nodejs/node

Tutte le issue di nodejs/node

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.