felixrieseberg / windows-build-tools

:package: Install C++ Build Tools for Windows using npm
MIT License
3.4k stars 234 forks source link

Windows Build Tools failing to install #253

Open axc450 opened 3 years ago

axc450 commented 3 years ago

I have been running into a common issue with installing windows-build-tools as part of a CI pipeline in which the installer would just hang or fail. See #252 #179 #152 etc A common workaround is to use npm install --global --production windows-build-tools@4.0.0 which worked perfectly up until around mid April. It looks like the installer just fails to download the information it needs. Some things I picked out of the log:

Error 0x80070002: Failed attempt to download URL: 'http://go.microsoft.com/fwlink/?prd=12514&pver=Dev14&sbp=d14rel&plcid=0x409&clcid=0x409&ar=25420.01&sar=S80_RCPrep&o1=1F0C5812581EFDCA1A2A9C3BCE802F53D7832D6E' to: 'C:\Users\VSSADM~1\AppData\Local\Temp\{a9528995-e130-4501-ae19-bbfaddb779cc}\Msi_BuildTools_MSBuild_amd64'

Error 0x80190194: Failed attempt to download URL: 'bits://go.microsoft.com/fwlink/?prd=12514&pver=Dev14&sbp=d14rel&plcid=0x409&clcid=0x409&ar=25420.01&sar=S80_RCPrep&o1=1F0C5812581EFDCA1A2A9C3BCE802F53D7832D6E' to: 'C:\Users\VSSADM~1\AppData\Local\Temp\{a9528995-e130-4501-ae19-bbfaddb779cc}\Msi_BuildTools_MSBuild_amd64'
Prompt for source of package: Msi_BuildTools_MSBuild_amd64, payload: Msi_BuildTools_MSBuild_amd64, path: C:\Users\VssAdministrator\.windows-build-tools\packages\BuildTools_MSBuild_amd64\BuildTools_MSBuild.msi
Next Source: Web, Attempted: 3, Limit:3
Source retrieved: Web
Sleep for 3 seconds before retrying

Error 0x80070002: Failed to send request to URL: http://go.microsoft.com/fwlink/?prd=12514&pver=Dev14&sbp=d14rel&plcid=0x409&clcid=0x409&ar=25420.01&sar=S80_RCPrep&o1=1F0C5812581EFDCA1A2A9C3BCE802F53D7832D6E
Error 0x80070002: Failed to connect to URL: http://go.microsoft.com/fwlink/?prd=12514&pver=Dev14&sbp=d14rel&plcid=0x409&clcid=0x409&ar=25420.01&sar=S80_RCPrep&o1=1F0C5812581EFDCA1A2A9C3BCE802F53D7832D6E
Error 0x80070002: Failed to get size and time for URL: http://go.microsoft.com/fwlink/?prd=12514&pver=Dev14&sbp=d14rel&plcid=0x409&clcid=0x409&ar=25420.01&sar=S80_RCPrep&o1=1F0C5812581EFDCA1A2A9C3BCE802F53D7832D6E
Error 0x80070002: Failed attempt to download URL: 'http://go.microsoft.com/fwlink/?prd=12514&pver=Dev14&sbp=d14rel&plcid=0x409&clcid=0x409&ar=25420.01&sar=S80_RCPrep&o1=1F0C5812581EFDCA1A2A9C3BCE802F53D7832D6E' to: 'C:\Users\VSSADM~1\AppData\Local\Temp\{a9528995-e130-4501-ae19-bbfaddb779cc}\Msi_BuildTools_MSBuild_amd64'
MUX:  Acquire Failed.  Retry acquiring after sleeping for 3 seconds, Retry Count: 1 of 3

Could not install Visual Studio Build Tools.

Does anyone know what could be causing this?

pjbrigden commented 3 years ago

I have the same issue

Bopiotr commented 3 years ago

I also have this issue

HunteRoi commented 3 years ago

I do too

ilunie commented 3 years ago

I have the same issue, node 14

ilunie commented 3 years ago

Alternatives https://github.com/felixrieseberg/windows-build-tools/issues/245#issuecomment-825547606

Bopiotr commented 3 years ago

Alternatives #245 (comment)

yep, Installing by choco works for me.

bennycode commented 3 years ago

On my system (Win 10 Pro) npm install --global --production windows-build-tools@4.0.0 works but installing the latest version fails.

I am using Node v15.14.0 with npm v7.7.6.