-
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
node-gyp with Windows 8 and Visual Studio 2012 #168
Comments
What version of node-gyp are you using? Visual Studio 2012 on Windows 8 works for me using the latest version of node-gyp. |
I am using 0.8.1 node-gyp -v -> v0.8.1 I am getting the error: C:\Users\Kevin>npm install msnodesql
C:\Users\Kevin\node_modules\msnodesql>node "C:\Program Files\nodejs\node_modules npm ERR! System Windows_NT 6.2.9200 |
Do you have VS 2010 installed with VS 2012? |
I'm having the same issue and I have both 2012 and 2010 installed. Anyway to get around this issue? |
I'm also having this issue. Same config. |
Same issue here when trying to install msnodesql ( @jguerin ) . C:\Users\Andreas>npm install msnodesql
C:\Users\Andreas\node_modules\msnodesql>node "C:\Program Files\nodejs\node_modul |
Are you launching this from the Visual Studio Command Prompt? I just tried on Windows 8 using Visual Studio 2012 Express for Windows Desktop compiler (without the Windows 8 SDK installed), and it worked fine:
|
That was the initial question. I can get it to work if I install VS 2010 (since it is 64-bit I have to install the SDK) and the patch for VS 2010 and the VS 2010 SDK (7.1) and the patch for the SDK. But all of that takes over an hour and all of this is onlly installed for msnodesql. Since the other memers of my team have long ago moved on to VS 2012 to ask everyone to install all of this just for msnodesq is not practical. Since node-gyp runs OK on Linux I was hoping that there was some way to configure node-gyp to use VS 2012 and its associated SDK rather than having a dependency on VS 2010. Is that possible? |
Visual Studio 2012 on Windows 8 works for me using the latest version of node-gyp. |
I install node-gyp so I know I have the latest: But when I install msnodesql I see the VS 2010 dependency: C:\Users\kevinb>npm install msnodesql
C:\Users\kevinb\node_modules\msnodesql>node "C:\Program Files\nodejs\node_module
npm ERR! System Windows_NT 6.2.9200 |
@KevinBurton You're most likely not updating npm's internal copy of node-gyp: https://github.com/TooTallNate/node-gyp/wiki/Updating-npm's-bundled-node-gyp |
I tried this: C:\Program Files\nodejs\node_modules\npm>npm install node-gyp C:\Program Files\nodejs\node_modules\npm>npm install -g node-gyp Notice the prompt that show the directory that I am executing from. But I still get the error that indicates a dependency: C:\Users\kevinb>npm install msnodesql
C:\Users\kevinb\node_modules\msnodesql>node "C:\Program Files\nodejs\node_module
npm ERR! System Windows_NT 6.2.9200 |
Oh, it's installing the version of node-gyp specified in npm's $ npm install node-gyp@latest |
Thank you for the further suggestions but unfortunately I still get the same error when I install msnodesql. |
Is it possible that it is still using the "internal" version? Looking at the console I see: C:\Users\kevinb\node_modules\msnodesql>node "C:\Program Files\nodejs\node_module This seems to be going after node-gyp-bin. I only went to C:\Program Files\nodejs\node_module\npm and then did: npm install node-gyp@latest |
@KevinBurton Try using the |
I issued 'npm install msnodesql --msvs_version=auto' with the same error: C:\Users\kevinb>npm install msnodesql --msvs_version=auto
C:\Users\kevinb\node_modules\msnodesql>node "C:\Program Files\nodejs\node_module
npm ERR! System Windows_NT 6.2.9200 |
My bad, try |
Better now it is not complaining about VS 2010 but the build fails:
I have removed alot of the warnings and compile errors but thie gist is that the build fails to compile. This is probably a issue that needs to go to the msnodesql package maintainers. But, before you go is there any way that I can make the --msvs_version "standard".? In other words default to using VS 2012? |
Well show me the full output with |
The compiler errors seem to be too long for github.com. When I paste them in my page goes down. Here is the rest of the output:
|
Looks like you don't have |
Oh I take that back, you do. Is this the entire output? |
Specifically it doesn't look like any output from msbuild.exe is being pasted here. |
Got a output very similar to @KevinBurton . Heres the entire output. Hope this can be of any help.
|
Well I'm not entirely sure what that's all about. I'm starting to think it's a gyp bug... |
The output from msbuild is all of the build errors (there are over 300 errors and some 30 warnings). If I try to paste those in the window then I consistently get an error "gethub not responding". So I gave up and gave you an abbreviated listing. If you feel it would be useful I could try sending it to an email account. |
One more comment. I have a 64-bit version of Node.js but in looking at the output it seems that a 32-bit compiler is being used. Do you think that is an issue? |
Yes, yes I do. Why is it necessary that you run 64-bit Node.js? Any chance you could try to compile using the 32-bit version just to ease the troubleshooting for this? Cheers, Jonathan |
It is not necessary for me but I just thought it should be made know since when you click on the 'INSTALL' button at nodejs.org it installs the 64-bit version (if you are running a 64-bit OS, which is more and more common). So in doesn't look like msnodesql will install with a 64-bit version of node.js. Isn't that the question of this thread? |
I googled this error and there are some solutions. I haven't tried them, because first I want to understand what was the problem with the previous error? Something was going wrong with paths? |
I got Windows 8 x64 n' VS 2012 ... tried npm install all over the place and kept getting error Running from VS command prompt worked like a charm ty |
Can you all please try node-gyp v0.9.3? |
I'm having similar issues with different packages. On Windows 8 x64 (and Node, v0.10.9 x64), I have complete VS 2012 premium, no VS 2010, no Python. I already updated the internal Example error without the switch:
Example error with the switch:
|
I had a similar issue with node-gyp, I have visual studio 2012 pro edition. The reason this error occurs is because node-gyp only looks for the VC 2012 express editions. So currently if express isn't installed it fails on the msbuild task. I've added a pull request which added checks for full visual studio 2012 (32&64bit). Here is a useful tip for when you have multiple visual studio versions installed i.e vs2010 and vs2012. Add the following environment variable (tells python what default version to use. i.e. 2010 or 2012 etc)
If you ever want to override the global GYP_MSVS_VERSION env var then run node-gyp and npm like this
hope this helps |
@pflannery thank you, thank you, for showing |
You have two possibilities if it does not work, I use a powershell in order to replace a basic shell and I add the VS2012 environment variables, otherwise you can start the visual studio cmd prompt and proceed normally. |
In case you're on Windows 8 x64 and you're having this problem:
This worked for me. I tried all other tutorials and 'fixes' I found on google previously, and none worked - they all mention other versions of Visual Studio and the SDK for windows 7. The above 3 steps is all you need. |
I was finally able to build with Win 8 x64 and VS 2012 Ultimate by setting the msvs_version=2012 and getting latest of node-sqlserver from github. |
Much work has gone into fixing this, awaiting final integration of fixes in nodejs/node-v0.x-archive#6667. |
Try that - will set it globally: |
I have also experienced problems with node-gyp. I've been trying to install leveldown on Windows8 x64 with visual studio 2012.
This error shows that an issue in collections__init__.py through shlex.py is blowing up. By removing the import statements directly in these gyp files
I could make a completed node-gyp rebuild:
Going futher, trying to install and build through npm install I hit the same problem again through another path:
Again the issue with the SyntaxError in collections__init__.py, but now through threading.py. |
For the "SyntaxError: unqualified exec is not allowed in function 'namedtuple' it contains a nested function with free variables" here is a solution. First of I found a test for the ensence of the SyntaxError problem with test.py: import collections
print('success!') running it through 3 different version of python makes it all a little clearer:
The recommendations on running node-gyp with python 2.7.3 clearly doesn't fit Windows 8.
Hope this helps somebody :) |
@einoodle I just trashed an entire day on this issue. Thanks to your post I was able to end it on a good note. Not sure if it was using 2.6 or simply defining the path to the Python executable inline with the command, but it worked. Cheers! |
this is what worked for me: npm install zombie --python=C:\tools\python27\python.exe --msvs_version=2013 I am on: |
node-gyp was broken for me when I removed VS2012 (I had VS2013) installed. --msvs_version=2013 fixed the issue, but a proper fix was setting the GYP_MSVS_VERSION=2013 environment variable. |
I can confirm @jellydonut's solution works: npm install gulp-sass --python=C:\tools\python27\python.exe --msvs_version=2013 Works. My setup is also: |
I have the same issue, but I resolve this step by step: |
I have both Visual Studio Express 2013 and Visual Studio Community 2015 installed. I was getting
The reason was that the latest Node.js for Windows downloaded from https://nodejs.org contains an old I had to update Node.js'es internal
Now it works (seems that it's using VS 2013 for the time being) |
I've been stuck here for a whole day,downloaded and instaled erverything.It doesn't seem to work. however,I run 'npm update',and god finally smiled at me.oh.and deleted everything in folder npm-cashe |
crap,it worked for one minute |
I had a similar issue, and the NPM command for windows-build-tools (from Option 1 in the docs) didn't work for me. I had to get the installer for Visual Studio 2015, and install the C++ tools manually.
Hope this helps anyone stumbling onto this problem. |
Is there a way that i can configure or rebuild node-gyp to use VS 2012 and the associated SDK? This is the only tool that I have that uses the two year old VS 2010 so to install this suite, its patches, the SDK that is for this compiler, and the patches for the SDK has become troublesome. Right now I am on Windows 8 with VS 2012 and I cannot install the 7.1 SDK because it says it will not install a file that already exists. All in all this is alot of headache to install all of these tools just for node-gyp. Any ideas?
The text was updated successfully, but these errors were encountered: