Skip to content

Cannot install on Windows 7 x64 #226

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

Closed
takempf opened this issue Oct 21, 2012 · 13 comments
Closed

Cannot install on Windows 7 x64 #226

takempf opened this issue Oct 21, 2012 · 13 comments

Comments

@takempf
Copy link

takempf commented Oct 21, 2012

I've tried everything I can to install node-canvas on my Windows machine, but I've hit a brick wall here. Any idea what my issue is?

C:\Users\Timothy\Repos\tandem.io-drawing\node_modules\canvas>node-gyp build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/property:TargetExt=.node',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: The Platf
orm for project 'canvas.vcxproj' is invalid.  Platform='x64'. You may be seeing this message because you are trying to
build a project without a solution file, and have specified a non-default Platform that doesn't exist for this project.
 [C:\Users\Timothy\Repos\tandem.io-drawing\node_modules\canvas\build\canvas.vcxproj]
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:\Users\Timothy\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:236:2
3)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:96:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7600
gyp ERR! command "node" "C:\\Users\\Timothy\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd C:\Users\Timothy\Repos\tandem.io-drawing\node_modules\canvas
gyp ERR! node -v v0.8.11
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok```
@corysimmons
Copy link

Yeah this is a known issue that's not going to be solved because Node64 (on Windows) is fubar.

Here's how to install it on 32 bit https://github.com./LearnBoost/node-canvas/wiki/Installation---Windows

@TooTallNate
Copy link
Contributor

@corysimmons 64-bit node works just fine for me.

@Fauntleroy You need to have the 64-bit Windows SDK installed. You also need to make sure to use 64-bit versions of the dependent DLL files.

@corysimmons
Copy link

node canvas for windows is hella hard.

@tj
Copy link
Contributor

tj commented Oct 24, 2012

everything is hard on windows ;) you opt-into it

@corysimmons
Copy link

@visionmedia Too poor for Mac and I have to do a lot of production stuff with Photoshop/Illustrator/After Effects, etc.

I've installed several flavors of Visual Studio (including C++ 2010), ran through the Windows Installation for cairo (the GTK+ all-in-ones for 32 and 64) and node-gyp on 32-bit and 64-bit nodejs, and have even gotten as far as installing node-canvas (on the 32-bit run), but keep end up getting errors when I try to run nib linear-gradient-image to get those pretty data uri gradients.

I'm getting a "has-canvas" error. Is there any way to easily test if I have node-canvas via command line? Or do I have to get into all that test makefile crap?

Btw, TJ, do you manage all these things yourself? If so, you're contributing an ungodly amount of stuff. How old are you?

@TooTallNate Here's the error I get when try to run it on 64-bit nodejs/GTK

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: The Platform for pro
ject 'canvas.vcxproj' is invalid.  Platform='x64'. You may be seeing this message because you are trying to build a project withou
t a solution file, and have specified a non-default Platform that doesn't exist for this project. [C:\Users\cory\AppData\Roami
ng\npm\node_modules\canvas\build\canvas.vcxproj]

@TooTallNate
Copy link
Contributor

@corysimmons You need the 64-bit Windows SDK http://www.microsoft.com/en-us/download/details.aspx?displayLang=en&id=8279.

Also, TJ isn't a real person. It's a cyborg.

@corysimmons
Copy link

@TooTallNate I already tried downloading installing the SDK before posting. Sorry I forgot to mention it.

@JingLiNaomi
Copy link

I have the same issue on my Windows 7 64bit. Tried everything I can find but still failed. Now I have to use my 32 bit windows virtual machine.

@Aldaviva
Copy link

Aldaviva commented Oct 1, 2014

I was able to resolve this issue by installing the 32-bit Windows MSI build of Node.js and uninstalling the 64-bit version. I'm running Windows 7 x64.

@joelclark
Copy link

confirmed, 32-bit nodejs install fixed for me as well

@andig
Copy link

andig commented Dec 31, 2014

Fixed for me by switching VC2010 to VC2012, both Express.

@relu-xz
Copy link

relu-xz commented Aug 30, 2015

Hey guys, I've posted a solution for this.

@LinusU
Copy link
Collaborator

LinusU commented Feb 15, 2016

Please see the posted solution, or the updated wiki-page...

@LinusU LinusU closed this as completed Feb 15, 2016
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

10 participants