felixrieseberg / windows-build-tools

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

Stuck at `Still waiting for installer log file...` #208

Open geniusjam opened 4 years ago

geniusjam commented 4 years ago
PS D:\Projects\airpen> npm install --global --production windows-build-tools
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

> windows-build-tools@5.2.2 postinstall C:\Users\user\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\user\.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\user\.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 ----------
Successfully installed Visual Studio Build Tools.
------------------- Python --------------------
Still waiting for installer log file...

I've been waiting for 18 minutes and it's still there.

cczw2010 commented 4 years ago

+1 windows 10 powershell (admin) babun (admin)

petertorelli commented 3 years ago

I found this workaround and it helped, but it is from 2019. Bugs me that there isn't a real answer for this with 3.1k stars on the repo

https://github.com/felixrieseberg/windows-build-tools/issues/179#issuecomment-485459559

ogrotten commented 3 years ago

+1 this problem right now today. @petertorelli fix worked.

jerbear2008 commented 3 years ago

Problem still happens for me, trying to use this for Rob--/memoryjs.

otherguy commented 3 years ago

Happens here too on CircleCI. @petertorelli fix worked! Thanks!

karlhorky commented 3 years ago

Another option is to try installing the build tools via Chocolatey instead (use an Administrator command line):

choco install python visualstudio2017-workload-vctools -y
npm config set msvs_version 2017

Maybe this should be documented in the readme as an alternative...

AbaLonG commented 3 years ago

Hello I faced "visual studio build tools waiting for log file" issue either. However, I managed to find out some regularity. "visual studio build tools waiting for log file" issue happens when you try to install vs2017 version which is default one for current windows-build-tools@5.2.2 That is why you can succeed installing windows-build-tools@4.0.0 because it uses vs2015 instead of vs2017. And there is a way to install windows-build-tools@5.2.2 with vs2015 instead of vs2017.

Use npm --vs2015 install --global windows-build-tools

It succeeded for me

raquibmca commented 3 years ago

Hello,

npm install --global --production windows-build-tools --vs2015.

Solved the issue.

jerbear2008 commented 3 years ago

@Avinash-75 I'm assuming that message was an accident.

Edit: They deleted their message.

dapperdandev commented 3 years ago

If you're running a single version of node.js, MSI now has the option to install build tools and python for you:

If you prefer to install things manually, or need to install packages without installing node.js (useful for nvm-windows users), the commands that node.js runs when that box is checked (same as https://github.com/felixrieseberg/windows-build-tools/issues/208#issuecomment-824915788):

Either way, don't forget to tell npm which msvs_version either globally or in your project:

nvm-windows users may need to keep track of the contents of their ~/.npmrc file to ensure these values align with their current node.js / node-gyp requirements.


Additional Notes:

I've been wrestling with this for the last 24 hours and I've wrestled with it several times over the last couple of years. I've had my head in the sand assuming that this would eventually work. It turns out the maintainers have specifically pointed out the easiest solution on this repository's README:

Please note that the official Node.js for Windows installer can now automatically install the required tools. That's likely a much better option than the module listed here (windows-build-tools).

Screenshot (same as above)

Here's the full contents of the truncated text:

Some npm modules need to be compiled from C/C++ when installing. If you want to be able to install such modules, some tools (Python and Visual Studio Build Tools) need to be installed.

Source: https://github.com/nodejs/node/blob/master/tools/msvs/msi/i18n/en-us.wxl#L15

Related: #172

karlhorky commented 3 years ago

@djbreen7 thanks for drawing attention to the visualstudio2017-workload-vctools Chocolatey package! I've updated my posts.

Are you certain that npm config set python /path/to/executable/python is needed if it's on the PATH? I've had a bunch of bootcamp students following these two commands with no troubles...

dapperdandev commented 3 years ago

@karlhorky It's probably a little overkill, especially for bootcamp students. I think even when multiple versions of python are installed that node-gyp does a good job of figuring out which one it needs and fails if the one it needs isn't on the PATH variable. I haven't verified that yet.

I updated my comment to link to the node-gyp README.

PIoneer2 commented 3 years ago

Got the topic starter issue. Solved with the --vs2015 key. Have VS2015 AND VS2019 installed at the same time.