Open geniusjam opened 4 years ago
+1 windows 10 powershell (admin) babun (admin)
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
+1 this problem right now today. @petertorelli fix worked.
Problem still happens for me, trying to use this for Rob--/memoryjs.
Happens here too on CircleCI. @petertorelli fix worked! Thanks!
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...
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
Hello,
npm install --global --production windows-build-tools --vs2015.
Solved the issue.
@Avinash-75 I'm assuming that message was an accident.
Edit: They deleted their message.
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):
choco install python
https://chocolatey.org/packages/pythonchoco install visualstudio2017-workload-vctools
https://chocolatey.org/packages/visualstudio2017-workload-vctools
visualcpp-build-tools
Either way, don't forget to tell npm which msvs_version either globally or in your project:
npm config set msvs_version 2017
npm config set python /path/to/executable/python
(This may be unnecessary. More info in the node-gyp README)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
@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...
@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.
Got the topic starter issue. Solved with the --vs2015
key.
Have VS2015 AND VS2019 installed at the same time.
I've been waiting for 18 minutes and it's still there.