-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Failed to install on Windows 8.1 x64 #451
Comments
I've got the same issue on Mac: $ npm install canvas
npm WARN package.json planning-poker@0.0.1 No repository field.
npm http GET https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/canvas
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
> canvas@1.1.5 install /Users/mcarey/Projects/dorightdigital/planning-poker/node_modules/canvas
> node-gyp rebuild
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
gyp: Call to './util/has_cairo_freetype.sh' returned exit status 0.
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mcarey/Projects/dorightdigital/planning-poker/node_modules/canvas
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! canvas@1.1.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas@1.1.5 install script.
npm ERR! This is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.3.0
npm ERR! command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/bin/npm" "install" "canvas"
npm ERR! cwd /Users/mcarey/Projects/dorightdigital/planning-poker
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/mcarey/Projects/dorightdigital/planning-poker/npm-debug.log
npm ERR! not ok code 0 Node: v0.10.24 (installed through brew) |
@Mathyn There's a wiki which describes how to install on Windows, it's up at https://github.com/Automattic/node-canvas/wiki/Installation%3A-Windows The Mac equivalent is https://github.com/Automattic/node-canvas/wiki/Installation:-Mac-OS-X The reason both these installs failed is that we don't have the request requirements FYI (to whom it may concern) - that means I won't be using node-canvas as it disproportionately requires additional installation steps for the benefit I get from it (see assaf/zombie#716 (comment)). It's not a big problem for me but I thought I'd share it in case it helps. |
Thank you for your response, Matcarey. I in fact did use this guide to you linked to. I'll try and follow it again because maybe I just missed/misunderstood a step. When you say the installs fail because they don't have the "request requirements" what do you mean with that? You also say you won't be using node-canvas, do you know of any alternatives? Again thank you for your response. |
Ah, I meant prerequisites (it requires more than just npm).
I've got a much simpler use-case than node-canvas is designed for - I just want to support canvas elements in jsdom. At the moment Zombie which uses jsdom throws exceptions when you use document.createElement('canvas').getContext('2d') because jsdom itself doesn't support canvas. My alternative is to use a basic stub interface which creates empty functions (see assaf/zombie#716) |
Hey guys, I've posted a solution for this. |
Please see the posted solution, or the updated wiki-page... |
I have tried the solutions posted in other issues found here. So far none of them helped. When installing node-canvas using
npm install canvas
it fails with the following errors:
C:\Users\Mathyn\My Documents\Aptana Studio 3 Workspace\XXXMapsServer\XXX_wmt
s_server>npm install canvas
npm http GET https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/canvas
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
C:\Users\Mathyn\My Documents\Aptana Studio 3 Workspace\XXXMapsServer\XXX_wmt
s_server\node_modules\canvas>node "D:\IT\NodeJS\node_modules\npm\bin\node-gyp-bi
n....\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:998:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:
34)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "D:\IT\NodeJS\node_modules\npm\node_modules\node-g
yp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Mathyn\My Documents\Aptana Studio 3 Workspace\XXXMapsSer
ver\XXX_wmts_server\node_modules\canvas
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! canvas@1.1.5 install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas@1.1.5 install script.
npm ERR! This is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\IT\NodeJS\node.exe" "D:\IT\NodeJS\node_modules\npm
\bin\npm-cli.js" "install" "canvas"
npm ERR! cwd C:\Users\Mathyn\My Documents\Aptana Studio 3 Workspace\XXXMapsSer
ver\XXX_wmts_server
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Mathyn\My Documents\Aptana Studio 3 Workspace\XXXMapsSer
ver\XXX_wmts_server\npm-debug.log
npm ERR! not ok code 0
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\IT\NodeJS\node.exe" "D:\IT\NodeJS\node_modules\npm
\bin\npm-cli.js" "install" "canvas"
npm ERR! cwd C:\Users\Mathyn\My Documents\Aptana Studio 3 Workspace\XXXMapsSer
ver\movin_wmts_server
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Mathyn\My Documents\Aptana Studio 3 Workspace\XXXMapsSer
ver\movin_wmts_server\npm-debug.log
npm ERR! not ok code 0
I am using Windows 8.1 x64. My NodeJS version is v0.10.28. I installed GTK 2.22 64 bit to C:\GTK and I set the Path variable to C:\GTK\Bin;
Does anyone know of any possible solutions?
The text was updated successfully, but these errors were encountered: