nodejs / node-gyp

Node.js native addon build tool
MIT License
9.91k stars 1.79k forks source link

Visual Studio 2017 #1056

Closed felixfbecker closed 7 years ago

felixfbecker commented 7 years ago

VS 2017RC1 is out now and has a new installer that allows even finer cherry-picking of the wanted components. What is the minimal set of components that need to be installed for using node-gyp? Could this be added to README?

rvagg commented 7 years ago

Yeah, I've been wondering the same thing, @nodejs/platform-windows, @joaocgreis, @felixrieseberg, @mousetraps can anyone fill us in on details on what's needed from VS 2017 to compile Node addons? Perhaps prepare a PR in anticipation of 2017 going gold?

felixfbecker commented 7 years ago

I have tried getting this to work with VS 2017 for a few days now without success.

Installing just "VC++2017 Compiler Toolset" is not enough and results in an error message from MSBuild that VCBuild.exe could not be found. A search inside the installation directories reveals that VCBuild.exe indeed wasn't installed anywhere. Maybe it is installed as part of .NET Framework?

$ npm i
npm WARN deprecated lodash-node@2.4.1: This package is discontinued. Use lodash@^4.0.0.

> lwip@0.0.9 install C:\Users\felix\git\Projekte\api\node_modules\lwip
> node-gyp rebuild

C:\Users\felix\git\Projekte\api\node_modules\lwip>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
MSBUILD : error MSB3428: Die Visual C++-Komponente "VCBuild.exe" konnte nicht geladen werden. Um dieses Problem zu beheben, installieren Sie
 entweder 1) .NET Framework 2.0 SDK oder 2) Microsoft Visual Studio 2005 oder 3) fügen Sie den Speicherort der Komponente zum Systempfad hin
zu, falls er vom Standardspeicherort abweicht.  [C:\Users\felix\git\Projekte\api\node_modules\lwip\build\binding.sln]
MSBUILD : error MSB3428: Die Visual C++-Komponente "VCBuild.exe" konnte nicht geladen werden. Um dieses Problem zu beheben, installieren Sie
 entweder 1) .NET Framework 2.0 SDK oder 2) Microsoft Visual Studio 2005 oder 3) fügen Sie den Speicherort der Komponente zum Systempfad hin
zu, falls er vom Standardspeicherort abweicht.  [C:\Users\felix\git\Projekte\api\node_modules\lwip\build\binding.sln]
MSBUILD : error MSB3428: Die Visual C++-Komponente "VCBuild.exe" konnte nicht geladen werden. Um dieses Problem zu beheben, installieren Sie
 entweder 1) .NET Framework 2.0 SDK oder 2) Microsoft Visual Studio 2005 oder 3) fügen Sie den Speicherort der Komponente zum Systempfad hin
zu, falls er vom Standardspeicherort abweicht.  [C:\Users\felix\git\Projekte\api\node_modules\lwip\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\felix\git\Projekte\api\node_modules\lwip
gyp ERR! node -v v7.1.0
gyp ERR! node-gyp -v v3.4.0

Setting msvs_version to 2017 results in an "undefined key" error from node-gyp.

rvagg commented 7 years ago

Ah, it looks like they're not even prepared for it upstream @ gyp: https://chromium.googlesource.com/external/gyp/+/master/pylib/gyp/MSVSVersion.py#238

joshgav commented 7 years ago

cc @digitalinfinity

felixrieseberg commented 7 years ago

Heya! I'm at Slack now, but still pretty invested in things being "okay" on Windows. I have a feeling this will be a tough one, but once things are fixed upstream, we should try to get https://github.com/felixrieseberg/windows-build-tools up to par with what'll be needed for most tools.

felixfbecker commented 7 years ago

Not so much interested in installing them from NPM, I just want to know what minimal components I need from the new (leightweight) VS installer

Fishrock123 commented 7 years ago

@felixrieseberg Status update?

felixfbecker commented 7 years ago

Is there an issue open at gyp about this?

mousetraps commented 7 years ago

Sorry, just saw this thread. Not surprising given that both the msbuild resolution scheme and the installer paths have been completely revamped in VS2017, so I suspect we'll, at the very least, need to make some modifications to node-gyp itself to properly locate the path when setting msvs_version. I'll investigate what we need to do to make this work again and report back.

joshgav commented 7 years ago

@mousetraps good to see you :)

/cc @kunalspathak who I believe has been looking at VS 2017 support as well.

mousetraps commented 7 years ago

Sweet! @kunalspathak idk how far you've gotten but happy to drop by this week and pair on it. I'm more familiar with the VS installer now than I ever wanted to be.

kunalspathak commented 7 years ago

Thanks @mousetraps . I haven't started any investigation yet, but would love to learn what it means to fix this.

seishun commented 7 years ago

Is VS2017 even supported by V8?

bnoordhuis commented 7 years ago

I don't think so. I believe their waterfall is based on VS 2015 at this point.

amigo421 commented 7 years ago

is it possible to adopt node-gyp to VS Build Tools only ? without whole studio installation? previous version (Visual C++ Build Tools 2015) does contain NMake build tool only, I suppose new is the same.

AndrewPardoe commented 7 years ago
  1. C++ tools v141 in VS 2017 are the same as C++ tools v140 in VS 2015. The minor version was bumped to deal with side-by-side issues. C++ tools v150 will come later.

  2. VCBuild.exe was replaced by MSBuild.exe years ago. LMK if you have trouble migrating to MSBuild.exe--I know people who can advise.

  3. VS 2017 installer lets you install side-by-side VS tools at a very granular level without any global state (no registry keys, etc.) There are command-line options for all installs, but documentation is still a little light in that area.

  4. The factoring of components in VS 2017 is intended such that you can install just what you need (within reason--even if you don't use dumpbin.exe, you still get it with link.exe.) If the factoring of the components is wrong for some reason (i.e., you need just one file from a component), let me know.

felixfbecker commented 7 years ago

@AndrewPardoe

VCBuild.exe was replaced by MSBuild.exe years ago. LMK if you have trouble migrating to MSBuild.exe--I know people who can advise.

I think the error that vcbuild.exe was not found only comes from gyp trying to locate the compiler tool, starting with the newest version and falling back to a lower version until it fails with the error that vcbuild.exe was not found. The issue seems to be that gyp simply does not work with VS 2017 atm.

AndrewPardoe commented 7 years ago

The recommended way to find a VC++ tools install with VS 2017 is to query a COM server. Heath Stewart, VS Setup guru, gives details and samples here: https://blogs.msdn.microsoft.com/heaths/2016/09/15/changes-to-visual-studio-15-setup/

amigo421 commented 7 years ago

I'm newbie in node and native add-ons, so from perspective , I don't understand why it relies on vcbuild, instead of msbuild. Andrew, the question to you as Microsoft compiler developer, as I remember , msbuild is not included into build tools kit. Why? Anyway, I believe the using nmake for gyp would be preferable. Gyp looks unsupported more project, is not it?

felixfbecker commented 7 years ago

@amigo421 Read my previous comment, this is not Microsoft's fault. msbuild is included in the compiler tools installation.

AndrewPardoe commented 7 years ago

@felixfbecker is right--MSBuild should be there. Regardless, we can support MSBuild, CMake, or NMake if you want to go old school :) Make a technical decision and then look at how the toolset can support it.

amigo421 commented 7 years ago

Please correct me if I'm wrong, I've tried to use node-gyp with build tools 2015, and the error was there. As I remember msbuild is not included, let me double check this.

felixfbecker commented 7 years ago

This issue is about VS 2017, not 2015. 2015 is working fine.

amigo421 commented 7 years ago

sorry - I see I'm writing in a topic about VS2017, I mean that my issue that node-gyp was not working for me with Build Tools 2015 only, I had to install VS2015 itself to make it workable

computeronix commented 7 years ago

Any updates on 2017 as 2017 will only install on Server Core 2016 but not 2015 and the 2017 is the future :)

digitalinfinity commented 7 years ago

I think @joaocgreis has started working on this, right Joao?

joaocgreis commented 7 years ago

That's right, I'll open a PR when I have something clean.

refack commented 7 years ago

@joaocgreis I got a minimal changeset to work. After rebasing to latest gyp we can "lie" to it by setting

  1. -Gmsvs_version=2015
  2. injecting these two parameters into the config.gypi
    "target_defaults"
      ...
      "msvs_target_platform_version" : "10.0.14393.0",
      "msbuild_toolset" : "v141",
     ...

    P.S. with these I got some native modules building on just the free "Visual C++ Build Tools"

felixfbecker commented 7 years ago

It's been over 2 months now, any update?

bzoz commented 7 years ago

PRs have been opened in node (https://github.com/nodejs/node/issues/11084) and node-gyp (https://github.com/nodejs/node-gyp/issues/1101)

refack commented 7 years ago

Also PR #1103

joaocgreis commented 7 years ago

For reference, the minimum installation of VS2017 that works with https://github.com/nodejs/node-gyp/pull/1130 is composed of:

refack commented 7 years ago

I think we can close this.

refack commented 7 years ago

"Bring back VS150COMNTOOLS" I urge everyone else to up vote at https://developercommunity.visualstudio.com/content/problem/35325/missing-vs150comntools.html

Alonski commented 7 years ago

Hey friends, Still can't get this Error to go away. I have these settings in VS Enterprise 2017: image image image

refack commented 7 years ago

@Alonski if you're comfortable with pulling "pre-release" bits, the code in the master git branch`(includes https://github.com/nodejs/node-gyp/pull/1198) should solve the problem. That is SDK 10.0.15063.0 needs special parsing to detect. Or you could try https://github.com/nodejs/node-gyp/issues/1179#issuecomment-301217151, but AFAICT once you installed 15063, the uninstall isn't clean...

Alonski commented 7 years ago

@refack Do I need to rebuild Node after pulling in the pre release or just gyp?

refack commented 7 years ago

@Alonski no need to rebuild, just pull node-gyp. FYI

Alonski commented 7 years ago

@refack Anyway to get more direct help exactly how to do this without going back and forth here? Inside "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\" All I have is the node-gyp and the node-gyp.cmd files

Edit: I wasn't looking in the right place 😅 Anyways I am still having trouble installing another package and I think it has something to do with node-gyp:

C:\WINDOWS\system32>npm i -g status-dev-cli
C:\Users\Alon\AppData\Roaming\npm\status-dev-cli -> C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\cli.js

> mdns@2.3.3 install C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns
> node-gyp rebuild

C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  dns_sd.cpp
  dns_service_browse.cpp
  dns_service_enumerate_domains.cpp
  dns_service_get_addr_info.cpp
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_service_browse.cpp) [C:
\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_service_enumerate_domai
ns.cpp) [C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_service_get_addr_info.c
pp) [C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_sd.cpp) [C:\Users\Alon\
AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
  dns_service_process_result.cpp
  dns_service_ref.cpp
  dns_service_ref_deallocate.cpp
  dns_service_ref_sock_fd.cpp
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_service_ref.cpp) [C:\Us
ers\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_service_process_result.
cpp) [C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_service_ref_deallocate.
cpp) [C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
  dns_service_register.cpp
  dns_service_resolve.cpp
  dns_service_update_record.cpp
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_service_ref_sock_fd.cpp
) [C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
  mdns_utils.cpp
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_service_register.cpp) [
C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_service_update_record.c
pp) [C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
  network_interface.cpp
  socket_watcher.cpp
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\dns_service_resolve.cpp) [C
:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
  txt_record_ref.cpp
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\mdns_utils.cpp) [C:\Users\A
lon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
  txt_record_create.cpp
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\network_interface.cpp) [C:\
Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\socket_watcher.cpp) [C:\Use
rs\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
  txt_record_deallocate.cpp
  txt_record_set_value.cpp
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\txt_record_ref.cpp) [C:\Use
rs\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
  txt_record_get_length.cpp
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\txt_record_create.cpp) [C:\
Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
  txt_record_buffer_to_object.cpp
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\txt_record_deallocate.cpp)
[C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\txt_record_set_value.cpp) [
C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
  win_delay_load_hook.cc
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\txt_record_get_length.cpp)
[C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
c:\users\alon\appdata\roaming\npm\node_modules\status-dev-cli\node_modules\mdns\src\mdns.hpp(32): fatal error C1083: Ca
nnot open include file: 'dns_sd.h': No such file or directory (compiling source file ..\src\txt_record_buffer_to_object
.cpp) [C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns\build\dns_sd_bindings.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Alon\AppData\Roaming\npm\node_modules\status-dev-cli\node_modules\mdns
gyp ERR! node -v v6.10.3
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
C:\Users\Alon\AppData\Roaming\npm
`-- (empty)

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "-g" "status-dev-cli"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! mdns@2.3.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mdns@2.3.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs mdns
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls mdns
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\WINDOWS\system32\npm-debug.log
npm ERR! code 1
refack commented 7 years ago

@Alonski so first of all it seems like you got node-gyp to work 👍 as for status-dev-cli more specifically it's dependency node-mdns. It seems like you'll need Apple's mDNSResponder as per https://github.com/agnat/node_mdns#installation

Alonski commented 7 years ago

@refack Yea thanks a lot! It is quite non intuitive that to install one package I need to debug two others 😄 Got what I wanted installed!

refack commented 7 years ago

@Alonski we are aware that the whole "native addons" story has some non trivial prerequisites, especially on Windows. We are constantly working on making it simpler.

Alonski commented 7 years ago

Thanks a lot! Will be looking out for updates

Alonski commented 7 years ago

Edit: Nevermind again... Used this: https://www.npmjs.com/package/windows-build-tools In Powershell

@refack Trying to install on my second laptop. Getting errors again and can't figure it out maybe you can:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'i',
1 verbose cli   '-g',
1 verbose cli   'mdns' ]
2 info using npm@5.0.0
3 info using node@v8.0.0
4 silly install loadCurrentTree
5 silly install readGlobalPackageData
6 http fetch GET 304 https://registry.npmjs.org/mdns 555ms (from cache)
7 silly pacote tag manifest for mdns@latest fetched in 624ms
8 silly install loadIdealTree
9 silly install cloneCurrentTreeToIdealTree
10 silly install loadShrinkwrap
11 silly install loadAllDepsIntoIdealTree
12 silly resolveWithNewModule mdns@2.3.3 checking installable status
13 http fetch GET 200 https://registry.npmjs.org/bindings 6ms (from cache)
14 http fetch GET 200 https://registry.npmjs.org/nan 6ms (from cache)
15 silly pacote range manifest for bindings@~1.2.1 fetched in 17ms
16 silly resolveWithNewModule bindings@1.2.1 checking installable status
17 silly pacote range manifest for nan@~2.3.0 fetched in 15ms
18 silly resolveWithNewModule nan@2.3.5 checking installable status
19 silly currentTree npm
20 silly idealTree npm
20 silly idealTree `-- mdns@2.3.3
20 silly idealTree   +-- bindings@1.2.1
20 silly idealTree   `-- nan@2.3.5
21 silly install generateActionsToTake
22 silly diffTrees action count 3
23 silly diffTrees add bindings@1.2.1
24 silly diffTrees add nan@2.3.5
25 silly diffTrees add mdns@2.3.3
26 silly decomposeActions action count 24
27 silly decomposeActions fetch bindings@1.2.1
28 silly decomposeActions extract bindings@1.2.1
29 silly decomposeActions preinstall bindings@1.2.1
30 silly decomposeActions build bindings@1.2.1
31 silly decomposeActions install bindings@1.2.1
32 silly decomposeActions postinstall bindings@1.2.1
33 silly decomposeActions finalize bindings@1.2.1
34 silly decomposeActions refresh-package-json bindings@1.2.1
35 silly decomposeActions fetch nan@2.3.5
36 silly decomposeActions extract nan@2.3.5
37 silly decomposeActions preinstall nan@2.3.5
38 silly decomposeActions build nan@2.3.5
39 silly decomposeActions install nan@2.3.5
40 silly decomposeActions postinstall nan@2.3.5
41 silly decomposeActions finalize nan@2.3.5
42 silly decomposeActions refresh-package-json nan@2.3.5
43 silly decomposeActions fetch mdns@2.3.3
44 silly decomposeActions extract mdns@2.3.3
45 silly decomposeActions preinstall mdns@2.3.3
46 silly decomposeActions build mdns@2.3.3
47 silly decomposeActions install mdns@2.3.3
48 silly decomposeActions postinstall mdns@2.3.3
49 silly decomposeActions finalize mdns@2.3.3
50 silly decomposeActions refresh-package-json mdns@2.3.3
51 silly install executeActions
52 silly doSerial global-install 24
53 verbose correctMkdir C:\Users\Alon\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
54 verbose lock using C:\Users\Alon\AppData\Roaming\npm-cache\_locks\staging-adaed73c8d0549a8.lock for C:\Users\Alon\AppData\Roaming\npm\node_modules\.staging
55 silly doParallel extract 24
56 silly extract bindings@1.2.1
57 silly pacote trying bindings@https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz by hash: sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=
58 silly extract nan@2.3.5
59 silly pacote trying nan@https://registry.npmjs.org/nan/-/nan-2.3.5.tgz by hash: sha1-gioNwmYpDOTNOhIoLKPn42Rmigg=
60 silly extract mdns@2.3.3
61 silly pacote trying mdns@https://registry.npmjs.org/mdns/-/mdns-2.3.3.tgz by hash: sha1-u8atVAeiMBM9YuDaaS8p8L1Jco4=
62 silly pacote bindings@https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz extracted to C:\Users\Alon\AppData\Roaming\npm\node_modules\.staging\bindings-29801563 by content address 30ms
63 silly pacote nan@https://registry.npmjs.org/nan/-/nan-2.3.5.tgz extracted to C:\Users\Alon\AppData\Roaming\npm\node_modules\.staging\nan-b2463e9a by content address 124ms
64 silly pacote mdns@https://registry.npmjs.org/mdns/-/mdns-2.3.3.tgz extracted to C:\Users\Alon\AppData\Roaming\npm\node_modules\.staging\mdns-f611a65d by content address 182ms
65 silly doReverseSerial remove 24
66 silly doSerial move 24
67 silly doSerial finalize 24
68 silly finalize C:\Users\Alon\AppData\Roaming\npm\node_modules\mdns
69 silly finalize C:\Users\Alon\AppData\Roaming\npm\node_modules\mdns\node_modules\nan
70 silly finalize C:\Users\Alon\AppData\Roaming\npm\node_modules\mdns\node_modules\bindings
71 silly doParallel refresh-package-json 24
72 silly refresh-package-json C:\Users\Alon\AppData\Roaming\npm\node_modules\mdns
73 silly refresh-package-json C:\Users\Alon\AppData\Roaming\npm\node_modules\mdns\node_modules\nan
74 silly refresh-package-json C:\Users\Alon\AppData\Roaming\npm\node_modules\mdns\node_modules\bindings
75 silly doParallel preinstall 24
76 silly preinstall mdns@2.3.3
77 info lifecycle mdns@2.3.3~preinstall: mdns@2.3.3
78 silly preinstall nan@2.3.5
79 info lifecycle nan@2.3.5~preinstall: nan@2.3.5
80 silly preinstall bindings@1.2.1
81 info lifecycle bindings@1.2.1~preinstall: bindings@1.2.1
82 silly lifecycle mdns@2.3.3~preinstall: no script for preinstall, continuing
83 silly lifecycle nan@2.3.5~preinstall: no script for preinstall, continuing
84 silly lifecycle bindings@1.2.1~preinstall: no script for preinstall, continuing
85 silly doSerial build 24
86 silly build mdns@2.3.3
87 info linkStuff mdns@2.3.3
88 silly linkStuff mdns@2.3.3 has C:\Users\Alon\AppData\Roaming\npm\node_modules as its parent node_modules
89 silly linkStuff mdns@2.3.3 is part of a global install
90 silly linkStuff mdns@2.3.3 is installed into a global node_modules
91 silly linkStuff mdns@2.3.3 is installed into the top-level global node_modules
92 verbose linkBins mdns@2.3.3
93 verbose linkMans mdns@2.3.3
94 silly build nan@2.3.5
95 info linkStuff nan@2.3.5
96 silly linkStuff nan@2.3.5 has C:\Users\Alon\AppData\Roaming\npm\node_modules\mdns\node_modules as its parent node_modules
97 silly linkStuff nan@2.3.5 is part of a global install
98 silly linkStuff nan@2.3.5 is installed into a global node_modules
99 verbose linkBins nan@2.3.5
100 verbose linkMans nan@2.3.5
101 silly build bindings@1.2.1
102 info linkStuff bindings@1.2.1
103 silly linkStuff bindings@1.2.1 has C:\Users\Alon\AppData\Roaming\npm\node_modules\mdns\node_modules as its parent node_modules
104 silly linkStuff bindings@1.2.1 is part of a global install
105 silly linkStuff bindings@1.2.1 is installed into a global node_modules
106 verbose linkBins bindings@1.2.1
107 verbose linkMans bindings@1.2.1
108 silly doSerial global-link 24
109 silly doParallel update-linked 24
110 silly doSerial install 24
111 silly install mdns@2.3.3
112 info lifecycle mdns@2.3.3~install: mdns@2.3.3
113 verbose lifecycle mdns@2.3.3~install: unsafe-perm in lifecycle true
114 verbose lifecycle mdns@2.3.3~install: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\Alon\AppData\Roaming\npm\node_modules\mdns\node_modules\.bin;C:\Users\Alon\AppData\Roaming\npm\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\PuTTY\;C:\Program Files\dotnet\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Users\Alon\AppData\Local\Android\android-sdk;C:\Users\Alon\AppData\Local\Android\android-sdk\tools;C:\Users\Alon\AppData\Local\Android\android-sdk\platform-tools;C:\Program Files (x86)\Yarn\bin;C:\Program Files\Docker Toolbox;C:\OpenSSL;C:\Program Files (x86)\HyperG;C:\Program Files\Geth;C:\Program Files\Docker Toolbox;C:\OpenSSL;C:\Program Files (x86)\HyperG;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\nodejs\;C:\Program Files\Bonjour SDK\;C:\Users\Alon\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\Alon\AppData\Local\Programs\Python\Python35-32\;C:\Users\Alon\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Windows\system32\node_modules\.bin;C:\Program Files (x86)\Microsoft VS Code Insiders\bin;C:\Users\Alon\AppData\Local\Yarn\bin;C:\Users\Alon\AppData\Roaming\npm
115 verbose lifecycle mdns@2.3.3~install: CWD: C:\Users\Alon\AppData\Roaming\npm\node_modules\mdns
116 silly lifecycle mdns@2.3.3~install: Args: [ '/d /s /c', 'node-gyp rebuild' ]
117 silly lifecycle mdns@2.3.3~install: Returned: code: 1  signal: null
118 info lifecycle mdns@2.3.3~install: Failed to exec install script
119 verbose unlock done using C:\Users\Alon\AppData\Roaming\npm-cache\_locks\staging-adaed73c8d0549a8.lock for C:\Users\Alon\AppData\Roaming\npm\node_modules\.staging
120 verbose stack Error: mdns@2.3.3 install: `node-gyp rebuild`
120 verbose stack Exit status 1
120 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:283:16)
120 verbose stack     at emitTwo (events.js:125:13)
120 verbose stack     at EventEmitter.emit (events.js:213:7)
120 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
120 verbose stack     at emitTwo (events.js:125:13)
120 verbose stack     at ChildProcess.emit (events.js:213:7)
120 verbose stack     at maybeClose (internal/child_process.js:887:16)
120 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
121 verbose pkgid mdns@2.3.3
122 verbose cwd C:\Windows\system32
123 verbose Windows_NT 10.0.14393
124 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "-g" "mdns"
125 verbose node v8.0.0
126 verbose npm  v5.0.0
127 error code ELIFECYCLE
128 error errno 1
129 error mdns@2.3.3 install: `node-gyp rebuild`
129 error Exit status 1
130 error Failed at the mdns@2.3.3 install script.
130 error This is probably not a problem with npm. There is likely additional logging output above.
131 verbose exit [ 1, true ]
refack commented 7 years ago

@Alonski so you were just missing the buildtools, and this is the error you got? IMHO that's a new issue: "Windows: npm@5 and no build tools installed, gives a non informative error message"

Alonski commented 7 years ago

@refack Thing is with npm 3 I wasn't able to use npm i -g windows-build-tools kept erroring out and I had to install everything by hand.

be5invis commented 7 years ago

@refack When would the latest node-gyp would be shipped with default Node.js?

gibfahn commented 7 years ago

would be shipped with default Node.js?

Do you mean Node 6?

be5invis commented 7 years ago

@gibfahn 8.

gibfahn commented 7 years ago

The latest release of node-gyp is 3.6.1, the version in Node 8.0.0 is also 3.6.1.

There are a couple of commits on node-gyp master since 3.6.1, they won't go into node until node-gyp does another release, that release is PR'd into npm5, and the updated npm version is PR'd into node.