-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Comments
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?
Setting |
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 |
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. |
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 |
@felixrieseberg Status update? |
Is there an issue open at gyp about this? |
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. |
@mousetraps good to see you :) /cc @kunalspathak who I believe has been looking at VS 2017 support as well. |
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. |
Thanks @mousetraps . I haven't started any investigation yet, but would love to learn what it means to fix this. |
Is VS2017 even supported by V8? |
I don't think so. I believe their waterfall is based on VS 2015 at this point. |
is it possible to adopt node-gyp to VS Build Tools only ? without whole studio installation? |
|
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. |
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/ |
I'm newbie in node and native add-ons, so from perspective , I don't understand why it relies on vcbuild, instead of msbuild. |
@amigo421 Read my previous comment, this is not Microsoft's fault. msbuild is included in the compiler tools installation. |
@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. |
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. |
This issue is about VS 2017, not 2015. 2015 is working fine. |
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 |
Any updates on 2017 as 2017 will only install on Server Core 2016 but not 2015 and the 2017 is the future :) |
I think @joaocgreis has started working on this, right Joao? |
That's right, I'll open a PR when I have something clean. |
@joaocgreis I got a minimal changeset to work. After rebasing to latest
P.S. with these I got some native modules building on just the free "Visual C++ Build Tools" |
It's been over 2 months now, any update? |
@Alonski so first of all it seems like you got |
@refack Yea thanks a lot! |
@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. |
Thanks a lot! Will be looking out for updates |
Edit: @refack
|
@Alonski so you were just missing the buildtools, and this is the error you got? |
@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. |
@refack When would the latest node-gyp would be shipped with default Node.js? |
Do you mean Node 6? |
@gibfahn 8. |
The latest release of node-gyp is There are a couple of commits on node-gyp master since |
We need a new |
Will be in |
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. |
Hello @Xan-Kun, |
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. |
@Xan-Kun good luck 👍 I have just a little bit of |
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. |
Hello, 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. |
Is there any fix? |
I resolved this issue by doing the following..
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. |
Unbelievable that this is still an issue. |
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. |
@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 |
@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. |
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?
The text was updated successfully, but these errors were encountered: