windows-build-tools icon indicating copy to clipboard operation
windows-build-tools copied to clipboard

Could not install Visual Studio Build Tools

Open Villan-98 opened this issue 5 years ago • 45 comments

PS C:\Windows\system32> npm install -g windows-build-tools

> [email protected] postinstall C:\Users\sachi\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./dist/index.js



Downloading vs_BuildTools.exe
[>                                            ] 0.0% (0 B/s)
Downloaded vs_BuildTools.exe. Saved to C:\Users\sachi\.windows-build-tools\vs_BuildTools.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 ----------
2018-10-20T08:56:31 : Verbose : [InstallerImpl]: Rpc connection was closed.
2018-10-20T08:56:31 : Verbose : [InstallerImpl]: Stream was closed
2018-10-20T08:56:31 : Verbose : [SetupUpdaterImpl]: Rpc connection was closed.
2018-10-20T08:56:31 : Verbose : [SetupUpdaterImpl]: Stream was closed
2018-10-20T08:56:32 : Verbose : Restarting the system after an installation operation.
------------------- Python --------------------
Python 2.7.15 is already installed, not installing again.


Could not install Visual Studio Build Tools.
Please find more details in the log files, which can be found at
C:\Users\sachi\.windows-build-tools

Skipping configuration: No configuration for Python or Visual Studio Build Tools required.
TypeError: Cannot read property 'then' of undefined
    at install_1.install (C:\Users\sachi\AppData\Roaming\npm\node_modules\windows-build-tools\dist\start.js:19:17)
    at launch_1.launchInstaller.then.then.then (C:\Users\sachi\AppData\Roaming\npm\node_modules\windows-build-tools\dist\install\index.js:34:9)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
+ [email protected]
added 143 packages in 39.518s

node version- 8.11 os: windows 10 npm version- 5.6

Villan-98 avatar Oct 22 '18 07:10 Villan-98

I'm getting this same issue.

pdavis68 avatar Oct 22 '18 17:10 pdavis68

same here node 8.12 os: windows 10 npm version- 6.4

Exlord avatar Oct 24 '18 09:10 Exlord

same here

Skipping configuration: No configuration for Python or Visual Studio Build Tools required.
TypeError: Cannot read property 'then' of undefined
    at install_1.install (D:\Users\kgoktas\AppData\Roaming\nvm\v8.12.0\node_modules\windows-build-tools\dist\start.js:19:17)
    at launch_1.launchInstaller.then.then.then (D:\Users\kgoktas\AppData\Roaming\nvm\v8.12.0\node_modules\windows-build-tools\dist\install\index.js:34:9)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
+ [email protected]
added 143 packages from 96 contributors in 11.84s

λ node -v
v8.12.0
λ npm -v
6.4.1

ridakk avatar Oct 24 '18 11:10 ridakk

I also faced this problem.

use 4.0.0 for now. The latest seems to be bugged

takase1121 avatar Oct 25 '18 07:10 takase1121

+1

awedev avatar Oct 29 '18 20:10 awedev

Damn

RossPfeiffer avatar Nov 16 '18 21:11 RossPfeiffer

same here npm -version 6.4.1 windows 10 node -v v10.13.0

LuKaXiya avatar Nov 28 '18 07:11 LuKaXiya

To those who are looking for an alternative way to get your machine set up, the Node.js project is working with Microsoft on a recipe for installing the required build toolchain (admittedly it's hard to get this one right). ATM we have two fairly decent suggestions:

  1. Install the MS VS2017 Community Edition as described in https://github.com/nodejs/node/pull/24462#discussion_r234450133 (The "Visual C++ build tools" workload + the "Python 2" and "Git for Windows" individual components)
  2. The new install_tools.bat from https://github.com/nodejs/node/pull/24677 Which is just: Install chocolatey, and run choco upgrade python2 visualstudio2017-workload-vctools. Or in script form:
    "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command Start-Process '%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe' -ArgumentList '-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command iex ((New-Object System.Net.WebClient).DownloadString(''https://chocolatey.org/install.ps1'')); choco upgrade -y python2 visualstudio2017-workload-vctools; Read-Host ''Type ENTER to exit'' ' -Verb RunAs
    

refack avatar Nov 28 '18 15:11 refack

Just use it simply It'll be work very smoothly

npm install --global --production [email protected]

hmmhmmhm avatar Dec 03 '18 17:12 hmmhmmhm

Thanks,it's done. just use npm install --global --production [email protected]

At 2019-01-14 15:27:45, "bgSosh" [email protected] wrote:

3 months - what's going on guys?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

LuKaXiya avatar Jan 16 '19 02:01 LuKaXiya

@LuKaXiya Apologies - that was a bit terse, I was having a bad day bad 😩

srlowe avatar Jan 16 '19 09:01 srlowe

Someone gave me this solution, you can give it a try.

To those who are looking for an alternative way to get your machine set up, the Node.js project is working with Microsoft on a recipe for installing the required build toolchain (admittedly it's hard to get this one right). ATM we have two fairly decent suggestions:

Install the MS VS2017 Community Edition as described in nodejs/node#24462 (comment) (The "Visual C++ build tools" workload + the "Python 2" and "Git for Windows" individual components) The new install_tools.bat from nodejs/node#24677 Which is just: Install chocolatey, and run choco upgrade python2 visualstudio2017-workload-vctools. Or in script form: "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command Start-Process '%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe' -ArgumentList '-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command iex ((New-Object System.Net.WebClient).DownloadString(''https://chocolatey.org/install.ps1'')); choco upgrade -y python2 visualstudio2017-workload-vctools; Read-Host ''Type ENTER to exit'' ' -Verb RunAs

在 2019-01-16 17:58:17,"bgSosh" [email protected] 写道:

@LuKaXiya Apologies - that was a bit terse, I was having a bad day bad 😩

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

LuKaXiya avatar Jan 16 '19 10:01 LuKaXiya

me too, how to deal with it

chris-envas avatar Apr 17 '19 03:04 chris-envas

I am also experiencing this issue with v5.1.0. Installation hangs and never finishes. Installing v4.0.0 worked.

alexdevero avatar Apr 26 '19 10:04 alexdevero

Just use it simply It'll be work very smoothly

npm install --global --production [email protected]

the savior

mithundas79 avatar Apr 29 '19 20:04 mithundas79

Just use it simply It'll be work very smoothly

npm install --global --production [email protected]

Thanks bro.

giegiey avatar May 02 '19 09:05 giegiey

Just use it simply It'll be work very smoothly

npm install --global --production [email protected]

thanks work very well

fer626 avatar May 07 '19 14:05 fer626

👍 Also stuck on this.

samrueby avatar May 16 '19 17:05 samrueby

Thank you so much, npm install --global --production [email protected] did the trick.

dcarter0317 avatar Jun 06 '19 16:06 dcarter0317

I tried npm install --global --production [email protected] and got:

[email protected] postinstall C:\Users\Grant\AppData\Roaming\npm\node_ modules\windows-build-tools node ./dist/index.js build-tools-log.txt

Downloading python-2.7.14.amd64.msi [> ] 0.0% (0 B/s) Downloaded python-2.7.14.amd64.msi. Saved to C:\Users\Grant.windows-build-tools \python-2.7.14.amd64.msi. Downloading BuildTools_Full.exe [> ] 0.0% (0 B/s) Downloaded BuildTools_Full.exe. Saved to C:\Users\Grant.windows-build-tools\Bui ldTools_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 ---------- Successfully installed Visual Studio Build Tools. ---------- Visual Studio Build Tools ---------- Successfully installed Visual Studio Build Tools. ------------------- Python -------------------- Successfully installed Python 2.7

Could not install Visual Studio Build Tools. Please find more details in the log files, which can be found at C:\Users\Grant.windows-build-tools

Now configuring the Visual Studio Build Tools and Python...

All done!

ulsting avatar Jun 11 '19 23:06 ulsting

Just use it simply It'll be work very smoothly

npm install --global --production [email protected]

Thank you ... Works perfectly

hamadgondal avatar Jun 19 '19 13:06 hamadgondal

This should be fixed with #183, however that's not been published to npm yet.

connor4312 avatar Jul 08 '19 21:07 connor4312

same issue:

Windows 10
Node v10.16.0
npm 6.9.0  
[email protected]

oshihirii avatar Jul 14 '19 08:07 oshihirii

Thank you, npm install --global --production [email protected] is worked for me.

Rabindramanohar avatar Jul 24 '19 13:07 Rabindramanohar

I am using below NPM versions

Npm - 6.9.0 Node - 10.16.0

While installing below command, still seeing Could not install Visual Studio Build Tools. issue. How to resolve this?

npm install -g --production [email protected]

image

And from the build-logs, I found below exception

MUX: Exception: Info: Could not download update data.

image

satishdabilpur avatar Aug 06 '19 12:08 satishdabilpur

Facing same error with node 10.16.3LTS, windows 7.

Have tried with npm install --global --production [email protected], but not worked.

Kindly do the needful

sudha53633 avatar Aug 30 '19 11:08 sudha53633

I am using below NPM versions

Npm - 6.9.0 Node - 10.16.0

While installing below command, still seeing Could not install Visual Studio Build Tools. issue. How to resolve this?

npm install -g --production [email protected]

image

And from the build-logs, I found below exception

MUX: Exception: Info: Could not download update data.

image

I had VS2015 and VS2017 installed. So once VS2015 is uninstalled, it worked perfectly.

satishdabilpur avatar Aug 30 '19 11:08 satishdabilpur

All of these solutions didn't work for me, installation gets stuck. I installed windows build tools manually after downloading & installing the windows 10 sdk iso from here, https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk

dinukasal avatar Sep 03 '19 04:09 dinukasal

Not to badmouth this package or anything, but maybe try using WSL. Node.js natives on windows is already hard despite this package made it much easier.

takase1121 avatar Sep 03 '19 05:09 takase1121

PS C:\Windows\system32> npm install -g windows-build-tools [email protected]

[email protected] postinstall C:\Users\M_H_I\AppData\Roaming\npm\node_modules\windows-build-tools node ./dist/index.js

Downloading python-2.7.15.amd64.msi [> ] 0.0% (0 B/s) Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\M_H_I.windows-build-tools\python-2.7.15.amd64.msi. Downloading vs_BuildTools.exe [> ] 0.0% (0 B/s) Downloaded vs_BuildTools.exe. Saved to C:\Users\M_H_I.windows-build-tools\vs_BuildTools.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 ---------- Still waiting for installer log file... ------------------- Python -------------------- Successfully installed Python 2.7

Anyone can tell me What's solution is this problem "Still waiting for installer log file..."..???

MHICoder15 avatar Sep 11 '19 13:09 MHICoder15