node-gyp rebuild fails for 0.2.3 #51

sundaymtn opened this Issue Feb 5, 2014 · 13 comments


None yet

7 participants


CentOS 6.3
node 0.10.24
npm 1.3.21
node-gyp 0.12.2

I can reproduce via "npm install node-stringprep@0.2.3" anywhere on my system,
tried to attach log but only images are supported, see interesting part of output below

gyp: Call to 'which icu-config > /dev/null || echo n' returned exit status 0.
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/scarter/Projects/local/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 Linux 2.6.32-431.el6.x86_64
gyp ERR! command "node" "/home/scarter/Projects/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/scarter/Projects/local/lib/node_modules/node-stringprep
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! node-stringprep@0.2.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-stringprep@0.2.3 install script.
npm ERR! This is most likely a problem with the node-stringprep 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 node-stringprep
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/home/scarter/Projects/local/bin/node" "/home/scarter/Projects/local/bin/npm" "i" "-g" "node-stringprep"
npm ERR! cwd /home/scarter/Projects/local/bin
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/scarter/Projects/local/bin/npm-debug.log
npm ERR! not ok code 0
dodo commented Feb 5, 2014

is which icu-config > /dev/null || echo n working for you in the shell?
could also please provide the output of node -e "require('nan')"?

btw, you can put log files in a gist :)


"which icu-config" doesn't resolve to anything on my path in the shell either.

In the meantime I have figured out that if I take a node_modules folder from a parallel project that I built before (I'm working with hubot) and copy it into my brand new hubot dir it works again. But I can't create from scratch anymore.

Good point on adding the log file as a gist.
Looking at the log it does not match my console output that has the npm ERR! section which lead me to node-stringprep originally. Instead it seems to point at node-xmpp. You can see I don't have a full grasp on what I'm dealing with here unfortunately.

requested cmd and output below

○ node -e "require ('nan')"

    throw err;
Error: Cannot find module 'nan'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at [eval]:1:1
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:456:26)
    at evalScript (node.js:532:25)
    at startup (node.js:80:7)
    at node.js:902:3
dodo commented Feb 5, 2014

you should run node -e "require ('nan')" in a dir which contains a node_modules with a nan folder inside.
like node-stringprep for example.

hm .. your log file says that npm stops because of a missing bin/esgenerate.js in the escodegen module while installing.


What I ended up having to do on CentOS was yum install libicu-devel I was immediately able to install node-stringprep without errors. (and ultimately hubot with the hubot-hipchat plugin installed)

dunno how I've been running for the last few months without it

@sundaymtn sundaymtn closed this Feb 5, 2014
dodo commented Feb 5, 2014

well the idea is that stringprep has javascript fallbacks and can run without the cpp addon, but doesn't give the right results of course.
i think we need centos support in binding.gyp so others don't run into the same problem like you did.

@dodo dodo reopened this Feb 5, 2014

For completeness the final clue for me was found at the link below once I started to zero in on xmpp and stringprep


It appears that there might also be the same issue for Ubuntu.

I added debug data at


For reference

$ uname -a
Linux dancrumb-Latitude-E6520 3.11.0-19-generic #33-Ubuntu SMP Tue Mar 11 18:48:34 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Never mind... this nodejs/node-gyp#363 fixed it

dodo commented May 1, 2014

thank you @dancrumb for finding out!

@lloydwatkin lloydwatkin closed this May 2, 2014

Thanks @sundaymtn! Installing libicu-devel fixed my issues on CentOS 6.5 as well.


Right, libicu-devel worked for me too on CentOS release 6.6 (Final). Thanks.


Great. After running yum install libicu-devel to install libicu my problem got resolved!

@lloydwatkin lloydwatkin locked and limited conversation to collaborators Mar 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.