Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio 2017 #1056

Closed
felixfbecker opened this issue Nov 21, 2016 · 64 comments
Closed

Visual Studio 2017 #1056

felixfbecker opened this issue Nov 21, 2016 · 64 comments
Assignees

Comments

@felixfbecker
Copy link

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
Copy link
Member

rvagg commented Nov 23, 2016

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
Copy link
Author

felixfbecker commented Nov 23, 2016

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
Copy link
Member

rvagg commented Nov 23, 2016

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
Copy link

joshgav commented Nov 23, 2016

cc @digitalinfinity

@felixrieseberg
Copy link
Member

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
Copy link
Author

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
Copy link
Contributor

@felixrieseberg Status update?

@felixfbecker
Copy link
Author

Is there an issue open at gyp about this?

@mousetraps
Copy link
Contributor

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
Copy link

joshgav commented Dec 5, 2016

@mousetraps good to see you :)

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

@mousetraps
Copy link
Contributor

mousetraps commented Dec 5, 2016

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
Copy link
Member

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

@seishun
Copy link

seishun commented Dec 5, 2016

Is VS2017 even supported by V8?

@bnoordhuis
Copy link
Member

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

@amigo421
Copy link

amigo421 commented Dec 7, 2016

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
Copy link

  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
Copy link
Author

@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
Copy link

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
Copy link

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
Copy link
Author

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

@AndrewPardoe
Copy link

@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
Copy link

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
Copy link
Author

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

@amigo421
Copy link

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
Copy link

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

@digitalinfinity
Copy link

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

@joaocgreis
Copy link
Member

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

@refack
Copy link
Contributor

refack commented Dec 28, 2016

@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
Copy link
Author

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

@refack
Copy link
Contributor

refack commented May 28, 2017

@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
Copy link

Alonski commented May 28, 2017

@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
Copy link
Contributor

refack commented May 28, 2017

@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
Copy link

Alonski commented May 28, 2017

Thanks a lot! Will be looking out for updates

@refack refack self-assigned this May 28, 2017
@Alonski
Copy link

Alonski commented May 31, 2017

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
Copy link
Contributor

refack commented May 31, 2017

@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
Copy link

Alonski commented Jun 1, 2017

@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
Copy link

be5invis commented Jun 1, 2017

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

@gibfahn
Copy link
Member

gibfahn commented Jun 1, 2017

would be shipped with default Node.js?

Do you mean Node 6?

@be5invis
Copy link

be5invis commented Jun 1, 2017

@gibfahn 8.

@gibfahn
Copy link
Member

gibfahn commented Jun 1, 2017

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.

@refack
Copy link
Contributor

refack commented Jun 1, 2017

We need a new 3.6.2 to solve @Alonski 's problem (building with sdk 10.0.15063)

@refack
Copy link
Contributor

refack commented Jun 2, 2017

Will be in npm@5.0.2
Ref: npm/npm#16894

@Xan-Kun
Copy link

Xan-Kun commented Jun 3, 2017

Hello! I am alittle confused about the status of node-gyp and VS2017 right now. Should it work? I could not get it to work right away, but the prerequisites of the VS installation leave a lot of space for errors (like accidentially installing Python 3!). I am trying out different angles and would love to write a follow up wiki page if there is a way to get it to work.
Thanks for your time.

@refack
Copy link
Contributor

refack commented Jun 3, 2017

Hello @Xan-Kun, node-gyp@3.6.2 should work even with with newer releases of VS2017 (including SDK 10.0.15063).
Since most people use node-gyp vicariously through npm i this fix will only be available in npm@5.02, but that should be released soon.
If you do write a wiki, also consider submitting a PR for our README.md since that is our reference document.

@Xan-Kun
Copy link

Xan-Kun commented Jun 4, 2017

Hello @refack and thank you so much for your answer. Actually, I try to get noble running with nw.js and every time I try (for 3 days now :-) ) I get stuck at another point (last thing were errors about a timespec struct). Without nw.js-hassle, node-gyp works seemlessly in VS2017 for me. I can install noble directly from the built in npm interface, it compiles the components and connects to the device.
But so far no luck :-/

@refack
Copy link
Contributor

refack commented Jun 4, 2017

@Xan-Kun good luck 👍 I have just a little bit of nw.js experience, so I can't give good advice. Although I know it's not super mature and there are allot of unsolved edge-cases, so you're not alone (Maybe try Electron everybody is super happy with it... 🤷‍♂️ )

@Xan-Kun
Copy link

Xan-Kun commented Jun 4, 2017

I tried electron too, got quite far, but ultimately, something didn't work, depending on which versions and combinations I used. With nw.js it is of course even harder, but I wanted to have direct access to node from within the webpage. That was a very dear feature for me. I couldn't get it to work after many tries (and even worse, it's one of these "i don't have a clue why it doesn't work-scenarios"). I will report if I ever get there.

@afages
Copy link

afages commented Sep 5, 2017

Hello,
Still in 2017, Visual Studio 2015 Express is findable on Microsoft sites: https://www.visualstudio.com/fr/post-download-vs/?sku=xdesk&clcid=0x409&telem=ga

Add the VCBuild.exe to the path and DEV environement is fixed, however deprecated.

I guess this won't be the case for long with their new politic but it's a substitute for projects with old NodeJS stack versioning. I have quite a few in my scope whose migrating NodeJS dev stack has never been the priority against other things. NodeJS is such a mess because he evolved way too fast and yet, now they are forking to Ayo.js.

As an architect, regarding the past years and how thoses NodeJS dependencies turned out is pretty laughable. So much heavy coupling, way too fast and too many evolutions.

@jsmonkey
Copy link

jsmonkey commented Feb 7, 2018

node-gyp still uses msvs 2015 with installed 2017 version

#1278

Is there any fix?

@willfsays
Copy link

willfsays commented Oct 4, 2018

I resolved this issue by doing the following..

  1. Open node-gyp folder (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp)
  2. Navigate to '\gyp\pylib\gyp'
  3. Open (for editing) MSVersion.py
  4. Search for 'v140' (line 237 in my case) default_toolset='v140'
  5. Change to 'v141' and save default_toolset='v141'
  6. This should change build tools location for VS 2015 to target the VS2017 tools installed, as shown below..
    versions = { '2015': VisualStudioVersion('2015', 'Visual Studio 2015', solution_version='12.00', project_version='14.0', flat_sln=False, uses_vcxproj=True, path=path, sdk_based=sdk_based, default_toolset='v141')

I also performed the above steps within the node_modules folder of the application (although I do not believe this was necessary).

Hopefully that helps someone else.

@msuiche
Copy link

msuiche commented Dec 16, 2018

Unbelievable that this is still an issue.

@msuiche
Copy link

msuiche commented Dec 16, 2018

I can't believe I'm wasting my time trying to find dependency to write JavaScript code seriously just because they can't support Visual Studio 2017.

@TheBeardedLlama
Copy link

@wfoster232 I'm running VS2017 and I fixed it by installing the VC2015.3 toolset for desktop, so I didn't have to manually edit any files

@ghost
Copy link

ghost commented Jan 31, 2019

@TooTallNate @bnoordhuis @isaacs can you please fix this? This is ridiculous. I'd imagine thousands upon thousands of developer hours have been completely wasted trying to debug this issue, and it still doesn't work.

tensorflow/tfjs#739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests