error when installing module from npm. #3

panosru opened this Issue Jan 26, 2012 · 8 comments


None yet
7 participants

panosru commented Jan 26, 2012

Hi, after successful installation of libgd2-xpm-dev I tried to run npm install stylus-sprite but I got the following output:

root@dev:/home/rnd/domains/design.rnd/public_html/app-ui# npm install stylus-sprite
npm http GET
npm http 304
npm http GET
npm http 304

> node-gd@0.1.8 install /home/rnd/domains/design.rnd/public_html/app-ui/node_modules/stylus-sprite/node_modules/node-gd
> node-waf configure build

Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr/local 
'configure' finished successfully (0.684s)
Waf: Entering directory `/home/rnd/domains/design.rnd/public_html/app-ui/node_modules/stylus-sprite/node_modules/node-gd/build'
[1/2] cxx: -> build/Release/node-gd_1.o
../ fatal error: node_events.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/home/rnd/domains/design.rnd/public_html/app-ui/node_modules/stylus-sprite/node_modules/node-gd/build'
Build failed:  -> task failed (err #1): 
    {task: cxx -> node-gd_1.o}
npm ERR! error installing node-gd@0.1.8
npm ERR! error installing stylus-sprite@0.1.7

npm ERR! node-gd@0.1.8 install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR! 
npm ERR! Failed at the node-gd@0.1.8 install script.
npm ERR! This is most likely a problem with the node-gd package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-gd
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Linux 2.6.32-5-amd64
npm ERR! command "node" "/usr/local/bin/npm" "install" "stylus-sprite"
npm ERR! cwd /home/rnd/domains/design.rnd/public_html/app-ui
npm ERR! node -v v0.6.8
npm ERR! npm -v 1.1.0-2
npm ERR! message node-gd@0.1.8 install: `node-waf configure build`
npm ERR! message `sh "-c" "node-waf configure build"` failed with 1
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/rnd/domains/design.rnd/public_html/app-ui/npm-debug.log
npm not ok



andris9 commented Jan 26, 2012

On Debian 5 (64bit) and node.js v0.6.8 node-gd compiles fine. I'm not sure if this is a node issue or node-gd issue that it doesn't compile on your system

panosru commented Jan 26, 2012

I'm using node.js v0.6.8 too :/

Seems that there are other people that have issues with node-gd too.. taggon/node-gd#13 it's worked at 0.6.6 and other ))))

It does not work on my Mac OS-X 10.3. I have libgd installed but I cannot install node-gd:

jacobstr commented May 7, 2012

The version of node-gd and gd in npm are forks of the original project here:

Taggon's node gd branch has merged a pull request from dudochkin-victor.

andris9, I'm not sure why your's is compiling fine and mine isn't. I've installed node from source rather than using apt.


andris9 commented May 7, 2012

I'm afraid I can't help much with this one - I have no idea what is going on in this module or how it really works, the only reason I forked it was because Taggon's version was not listed on npm at the time I needed it for my stylus-sprite module. If the original module is now in npm and compatible with stylus-sprite, I'd happily change the dependency.

mscdex commented May 8, 2012

FWIW you can also specify tarball or git urls in your dependency's required version number/range field to fetch from those places instead of from within npm.


in your dependancies object will work like magic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment