node-gyp icon indicating copy to clipboard operation
node-gyp copied to clipboard

Windows users are not happy.

Open luisrudge opened this issue 11 years ago • 474 comments

It all started with this conversation.

As I said, I'm pretty much a newbie and I don't even know what node-gyp does, but what I DO know is that it's a pain to run Windows and install a project with node-gyp as a dependency. Some numbers:

It's bizarre that a nodejs developer needs to install visual studio (even the express edition) in order to be able to work on Windows. Even more bizarre is that I, as a .NET developer with full visual studio installed in my machine still can't download a bunch of projects that use this project.

With that being said, I'd like to know from all of you what should we do to make windows users fall in the pit of success? What are the alternatives? Does Microsoft can solve this in any way?

This issue is fixed (kinda)

@mousetraps pointed that Microsoft is shipping the C++ build tools separately now. Check here

Some updates on this gigantic thread

Absolutely non-official statement that @Microsoft is aware of this issue and seeing what can be done

@mousetraps said that this thread "is high on people's radar" at @Microsoft

Very good Q&A about noge-gyp issues on Windows and why they happen

@dekarguy took the time to answer some questions about what we all are going through

luisrudge avatar May 22 '15 03:05 luisrudge

@joncaves, unfortunately you seems to be the only person from VC team on GitHub, therefore I am pining you. Apologies in advance! :)

Since this is one of the attention drawing hot topic these days and VC team or (despite their tremendous work in at least past 5 years) getting bad PR etc. can any of the bosses or bosses-like entities form VC team @Microsoft can chime in here and provide any kind of reassurances for native lib devs / build system folks? I would love to hear from Eric Battalio's, Jim Springfield's (and co) take on "having free C/C++ build-tools incl. SDK etc. on windows" matter.

Thanks in advance for listening!

ghost avatar Oct 07 '15 20:10 ghost

@orangemocha, but does VS Express not have the same limitations for large organizations? What are the "license terms provided with each product"? Unless those terms are different than VS Community then it is a real shame there are no longer any truly free compilers from Microsoft for their own platform.

dlong500 avatar Oct 07 '15 20:10 dlong500

No problem: I am not (directly) involved in this work but I passed your email on to the people who are (including @mousetraps).

Thanks JonCaves

On Wed, Oct 7, 2015 at 1:43 PM -0700, "Peter Jas" <[email protected]mailto:[email protected]> wrote:

@joncaveshttps://github.com/joncaves, unfortunately you seems to be the only person from VC team on GitHub, therefore I am pining you. Apologies in advance! :)

Since this is one of the attention drawing hot topic these days and VC team or (despite their tremendous work in at least past 5 years) getting bad PR etc. can any of the bosses or bosses-like entities form VC team @Microsofthttps://github.com/Microsoft can chime in here and provide any kind of reassurances for native lib devs / build system folks? I would love to hear from Eric Battalio's, Jim Springfield's (and co) take on "having free C/C++ build-tools incl. SDK etc. on windows" matter.

Thanks in advance for listening!

Reply to this email directly or view it on GitHubhttps://github.com/nodejs/node-gyp/issues/629#issuecomment-146321928.

joncaves avatar Oct 07 '15 22:10 joncaves

@dlong500 The Express 2015 licensing doesn't appear to have the same verbiage regarding large organizations and whatnot. See the following links to license terms for more info:

There is also this licensing whitepaper that has some additional info: http://www.microsoft.com/en-us/download/details.aspx?id=13350

That said... I'm an engineer, not a lawyer... so I can't do any more than post links to content that's already freely available. :smiley:

mousetraps avatar Oct 08 '15 00:10 mousetraps

+1 to seeing this situation get better, I just lost a night to troubleshooting this but now having found this thread have a lot more to try. thanks everyone for work and sharing so far.

bmuenzenmeyer avatar Oct 08 '15 06:10 bmuenzenmeyer

@dlong500, this has been confirmed by a member of the legal team at Microsoft: there’s no enterprise usage limitation in the VS Express EULA.

orangemocha avatar Oct 08 '15 10:10 orangemocha

@orangemocha, thanks for clarification of VS Express EULA. So, I have tried VS Express 2015 and it's working ok on new virtual machine. Config which I was using: Windows 10, Visual Studio Express 2015 for desktop, Windows 10 SDK, nodejs 4.1.2, node-gyp 3.0.3, python 2.7.10, git 2.6.1. I have added env. variable GYP_MSVS_VERSION=2015 and then executed npm config set msvs_version=2015. Note: installing SDK is not optional; without it, compilation will fail with error Could not load the Visual C++ component "VCBuild.exe".

antelle avatar Oct 08 '15 20:10 antelle

@orangemocha yes, thanks for the info. The ideal solution would be a minimal build-tools package from Microsoft, but this is certainly a good workaround for now.

dlong500 avatar Oct 08 '15 20:10 dlong500

I am desperate now :-1:

I have reinstalled windows. Have now fresh Windows 7 + Windows 7.1 SDK + Latest Node and NPM + C++ Compiler for Python 2.7 and Python 2.7, but am getting myriads of errors on compile:

Example:

[email protected] install c:\Projects\test\node_modules\bufferutil
> node-gyp rebuild


c:\Projects\test\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\Tomi\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild ) 
  bufferutil.cc
C:\Users\Tomi\.node-gyp\4.2.0\include\node\v8.h(336): error C2988: unrecognizable template declaration/definition [c:\Projects\test\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Tomi\.node-gyp\4.2.0\include\node\v8.h(336): error C2059: syntax error : 'using' [c:\Projects\test\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Tomi\.node-gyp\4.2.0\include\node\v8.h(469): error C2988: unrecognizable template declaration/definition [c:\Projects\test\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Tomi\.node-gyp\4.2.0\include\node\v8.h(469): error C2059: syntax error : 'using' [c:\Projects\test\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Tomi\.node-gyp\4.2.0\include\node\v8.h(472): error C2332: 'enum' : missing tag name [c:\Projects\test\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Tomi\.node-gyp\4.2.0\include\node\v8.h(472): error C3306: 'v8::<unnamed-tag>': unnamed class template is not allowed [c:\Projects\test\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Tomi\.node-gyp\4.2.0\include\node\v8.h(472): error C2236: unexpected 'class' 'v8::WeakCallbackType'. Did you forget a ';'? [c:\Projects\test\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Tomi\.node-gyp\4.2.0\include\node\v8.h(472): error C3381: 'v8::WeakCallbackType' : assembly access specifiers are only available in code compiled with a /clr option [c:\Projects\test\node_modules\bufferutil\build\bufferutil.vcxproj]
C:\Users\Tomi\.node-gyp\4.2.0\include\node\v8.h(576): error C2061: syntax error : identifier 'WeakCallbackType' [c:\Projects\test\node_modules\bufferutil\build\bufferutil.vcxproj]
          C:\Users\Tomi\.node-gyp\4.2.0\include\node\v8.h(642) : see reference to class template instantiation 'v8::PersistentBase<T>' being compiled

Any idea? Thanks!

tomitrescak avatar Oct 13 '15 04:10 tomitrescak

@tomitrescak It looks like Visual Studio Express 2015 for desktop (or VS Community) is the only way to get the C/C++ build tools

vdh avatar Oct 13 '15 05:10 vdh

I'd love to ditch windows on my development pc, and just use ubuntu for everything. So I have a (possibly dumb) question: Is it at all possible to build the .node native extensions for windows, using a linux machine?

srlowe avatar Oct 13 '15 10:10 srlowe

One way of dev life is to bash MS/VS/Windows on GitHub every possible chance you get and achieve nothing but more spite. The other approach is to report the issue where it belong:http://blogs.msdn.com/b/visualstudio/archive/2015/10/08/visual-studio-2015-update-1-ctp.aspx#10647152 or on Microsoft Connect etc., which will definitely make a real impact. Point being, instead of getting desperate yourself, give THEM the bug and get the tech improved for the welfare of future of tech and mankind!

ghost avatar Oct 13 '15 10:10 ghost

@jasonwilliams200OK . That's not very helpful. Rest assured that many people on this thread have tried to go the official routes with MS. We have jobs to do, and are simply looking for practical solutions to these problems that wont take months (or worse).

srlowe avatar Oct 13 '15 10:10 srlowe

@bgSosh, yes exactly trolling is not helpful, but reporting the issue where it belongs definitely is. Besides, this is not a today's problem and specific to node.js runtime. People are asking for independent buildtools for many years, way before the existence of node.js and even v8. So if it is going to happen in few "months", then it would be a great deal. But I am not crossing my fingers for months timeline just yet, unless we hear about some concrete plan.

ghost avatar Oct 13 '15 10:10 ghost

Is it at all possible to build the .node native extensions for windows, using a linux machine?

Not at the moment but it might be once clang++ / clang-cl gets ABI-compatible enough with MSVS. It's possible 3.7 is already good enough for everyday use but I haven't tested that.

bnoordhuis avatar Oct 13 '15 10:10 bnoordhuis

@bnoordhuis - Thank you! I'll check it out.

srlowe avatar Oct 13 '15 10:10 srlowe

I just had the problem again with this command:

d:\tmp> npm install mongoose --save

This fixed it:

C:\tmp4> set PATH=C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Windows\Microsoft.NET\Framework\v4.0.30319;%PATH%

dperu avatar Oct 13 '15 17:10 dperu

I came into this problem using ionic, and in it's docs http://ionicframework.com/docs/guide/installation.html, it recommends: If you are on Windows, make sure to download and install Git for Windows and optionally Console2. You will be executing any commands in this guide in the Git Bash or Console2 windows.

Stupidism avatar Oct 22 '15 15:10 Stupidism

12GB. Do I have to download 12GB of Microsoft garbage (and then some) to contribute 20 lines of code to a Javascript project?

2 days - do I have to waste 2 days to contribute 10 minutes of work?

Microsoft - do I really have to plague my PC with MS stuff to contribute to a project using Node?

This all makes sense, does it not? "Windows users are not happy" is an euphemistic understatement.

ppeterka avatar Oct 24 '15 16:10 ppeterka

do I really have to plague my PC with MS stuff..

Sounds like you are using Unix-like operating system, then you don't need VS tooling at all to build the "node.js project only the one with native module".

ghost avatar Oct 24 '15 16:10 ghost