I ran the command npm install --global --production windows-build-tools from the Command Prompt as Administrator on Windows.

I noticed that it was stuck at this point and pressed Control + C. It prompted me to Terminate batch job (Y/N)? I entered N but it still terminated.
I looked in the log and found the following error.
[34A4:1CA4][2018-06-12T10:39:24]i300: Apply begin [34A4:1CA4][2018-06-12T10:39:24]i000: MUX: Apply Phase Begin [34A4:1CA4][2018-06-12T10:39:24]i000: MUX: ----------------- [34A4:1CA4][2018-06-12T10:39:24]i000: MUX: Metrics: ShouldSendData=True [34A4:1CA4][2018-06-12T10:39:24]i000: Setting string variable 'CEIPConsent' to value '/CEIPconsent' [34A4:1CA4][2018-06-12T10:39:24]e000: MUX: WARNING: Item has already been added. Key in dictionary: 'path' Key being added: 'path' [34A4:1CA4][2018-06-12T10:39:24]e000: MUX: Stack: at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.Add(Object key, Object value) at System.Collections.Specialized.StringDictionary.Add(String key, String value) at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) at Microsoft.CSharp.CSharpCodeGenerator.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeReturnValue, String trueArgs) at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames) at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources) at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources) at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources) at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace) at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace) at System.Xml.Serialization.XmlSerializer..ctor(Type type) at Microsoft.Devdiv.Bootstrapper.CustomizationViewModel.UpdateStateStore() at Microsoft.Devdiv.Bootstrapper.ViewModelBase.ApplyBegin(Object sender, ApplyBeginEventArgs e)
I noticed another error as well.
[06D0:2B08][2018-06-12T13:37:53]i000: MUX: Setup update feature is enabled. Evaluating conditions to determine whether to run setup update. [06D0:2B08][2018-06-12T13:37:54]i000: MUX: Checking http://go.microsoft.com/fwlink/?LinkID=659005 for update. [06D0:2B08][2018-06-12T13:37:54]e000: MUX: Exception: Info: Could not download update data. [06D0:2B08][2018-06-12T13:37:54]e000: MUX: WARNING: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method. [06D0:2B08][2018-06-12T13:37:54]e000: MUX: Stack: at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at Microsoft.Devdiv.Bootstrapper.DownloadManager.DownloadXml(String url, Int32& returnCode) [06D0:2B08][2018-06-12T13:37:54]i000: MUX: Failed to download the update xml file from http://go.microsoft.com/fwlink/?LinkID=659005 Setup will not be updated. [06D0:2B08][2018-06-12T13:37:54]i052: Condition '( (CommunityCheck_DetectKey = 1) ) AND (CurrentOperation = "Install") ' evaluates to false. [06D0:2B08][2018-06-12T13:37:54]i052: Condition '((WDExpress_DetectKey = 1) ) AND (CurrentOperation = "Install")' evaluates to false. [06D0:2B08][2018-06-12T13:37:54]i052: Condition '( (VSWinExpress_DetectKey = 1) ) AND (CurrentOperation = "Install")' evaluates to false. [06D0:2B08][2018-06-12T13:37:54]i052: Condition '(VersionNT < v6.3) and ((not netfxfullredist_43_DetectKey_Exists) or (netfxfullredist_43_DetectKey_Version < v4.5.50709) or (netfxfullredist_43_DetectKey_Release < 378758))' evaluates to false. [06D0:2B08][2018-06-12T13:37:54]i052: Condition '(VersionNT = v6.3) AND (netfxfullredist_43_DetectKey < v4.5.25000)' evaluates to false.
How can I fix or work around this error?
@ryanvgates see #116. That might solve your problem
Thanks @lolptdr . I have tried to add Variable: IsInstalled = 1 to the log file. However it has not resolved the issue after saving it.
same issue here
G:\Projects\middleware\Middleware-UAE [ProductionMove ≡ +4 ~2 -0 !]> npm -g i windows-build-tools@latest > [email protected] postinstall C:\Users\ThunderEmperor\AppData\Roamingnpmnode_modules\windows-build-tools > node ./dist/index.js Downloading BuildTools_Full.exe [> ] 0.0% (0 B/s) Downloaded BuildTools_Full.exe. Saved to C:\Users\ThunderEmperor.windows-build-tools\BuildTools_Full.exe. Starting installation... Launched installers, now waiting for them to finish. This will likely take some time - please be patient! Status from the installers: ---------- Visual Studio Build Tools ---------- [328C:1AB0][2018-06-15T12:27:17]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{a9528995-e130-4501-ae19-bbfaddb779cc}, resume: ARP, restart initiated: No, disable resume: No [05E0:0EC0][2018-06-15T12:27:17]i399: Apply complete, result: 0x0, restart: None, ba requested restart: No ------------------- Python -------------------- Python 2.7.15 is already installed, not installing again.

i already had 2.7 installed on my machine...uninstalled python, installed windows build tools again, worked.
i already had 2.7 installed on my machine...uninstalled python, installed windows build tools again, worked.
Works for me. Thanks!
That fixed it for me as well. I think there should be a notice or something telling users that if you have python 2.7 installed already it won't work
Can this issue be reopened? There is a workaround but the bug still exists
Hey @robianmcd can you post the workaround please? am still facing it for more than 2 weeks.
some issue @robianmcd can you share your workaround plz
as said by @daniellizik,
i already had 2.7 installed on my machine...uninstalled python, installed windows build tools again, worked.
the workaround of uninstalling my existing python 2.7 also worked for me.
Surely there is a better way to mitigate this issue...
[email protected]:yunkido/npm.git
[email protected]:yunkido/npm.git
npm sucessful
Solved for me check this article
https://www.programmersought.com/article/29626541051/
Most helpful comment
i already had 2.7 installed on my machine...uninstalled python, installed windows build tools again, worked.