You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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?
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.
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.
denmovl, thasmo, crossan007 and henriquef-citthasmothasmo
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, felixfbecker, vintprox, 0x452, incognitojam and 2 morevintprox
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.
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.
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.
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.
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 :-/
@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... 🤷♂️ )
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.
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.
Open node-gyp folder (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp)
Navigate to '\gyp\pylib\gyp'
Open (for editing) MSVersion.py
Search for 'v140' (line 237 in my case) default_toolset='v140'
Change to 'v141' and save default_toolset='v141'
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.
noseratio, Alipoodle, BVSKanth, paulschwoerer, WendySanarwanto and 3 moreAlipoodle, lstolcman and KhafraDev
Activity
rvagg commentedon 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 commentedon 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?
Setting
msvs_version
to2017
results in an "undefined key" error from node-gyp.rvagg commentedon 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 commentedon Nov 23, 2016
cc @digitalinfinity
felixrieseberg commentedon Nov 23, 2016
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 commentedon Nov 23, 2016
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 commentedon Dec 5, 2016
@felixrieseberg Status update?
felixfbecker commentedon Dec 5, 2016
Is there an issue open at gyp about this?
mousetraps commentedon Dec 5, 2016
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 commentedon Dec 5, 2016
@mousetraps good to see you :)
/cc @kunalspathak who I believe has been looking at VS 2017 support as well.
mousetraps commentedon 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 commentedon Dec 5, 2016
Thanks @mousetraps . I haven't started any investigation yet, but would love to learn what it means to fix this.
seishun commentedon Dec 5, 2016
Is VS2017 even supported by V8?
bnoordhuis commentedon Dec 5, 2016
I don't think so. I believe their waterfall is based on VS 2015 at this point.
amigo421 commentedon 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.
44 remaining items
Xan-Kun commentedon 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 commentedon 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 throughnpm i
this fix will only be available innpm@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 commentedon 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 commentedon 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 tryElectron
everybody is super happy with it... 🤷♂️ )Xan-Kun commentedon 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 commentedon 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 commentedon Feb 7, 2018
node-gyp
still usesmsvs 2015
with installed 2017 version#1278
Is there any fix?
willfsays commentedon Oct 4, 2018
I resolved this issue by doing the following..
default_toolset='v140'
default_toolset='v141'
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 commentedon Dec 16, 2018
Unbelievable that this is still an issue.
msuiche commentedon 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 commentedon Jan 29, 2019
@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