mozilla/browserid — Issue #745: npm install fails on key generation and node CPU maxout
Author: jbonacci
Created: 2011-12-13 02:27:06+00:00
State: open

So, getting past the bigint/crypto issue on my Mac "all-in-one" install...

I run npm install after installing gmp/gmp-devel.

This is what I get:
npm WARN node-statsd@0.0.2 package.json: bugs['web'] should probably be bugs['url']

> bigint@0.3.7 install /Users/jbonacci/Git/browserid/node_modules/jwcrypto/node_modules/bigint
> 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.032s)
Waf: Entering directory `/Users/jbonacci/Git/browserid/node_modules/jwcrypto/node_modules/bigint/build'
[1/2] cxx: bigint.cc -> build/Release/bigint_1.o
[2/2] cxx_link: build/Release/bigint_1.o -> build/Release/bigint.node
Waf: Leaving directory `/Users/jbonacci/Git/browserid/node_modules/jwcrypto/node_modules/bigint/build'
'build' finished successfully (0.647s)

> jwcrypto@0.1.0 postinstall /Users/jbonacci/Git/browserid/node_modules/jwcrypto
> bash bundle.sh

****Bundling VEP for Browser****

****Packaging External Dependencies****

> browserid@0.0.1 postinstall /Users/jbonacci/Git/browserid
> ./scripts/generate_ephemeral_keys.sh

*** Generating ephemeral keys used for testing ***

and then an apparent "hang" on node.

Checking Activity Monitor, I see that node is maxing out the CPU.
After 20+ minutes, it is still maxing out the CPU.

I hit CTRL-C and see this:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: ENOENT, no such file or directory 'key.publickey'
at Object.openSync (fs.js:228:18)
at Object.readFileSync (fs.js:119:15)
at Object. (/Users/jbonacci/Git/browserid/node_modules/jwcrypto/bin/certify:35:39)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.0 (module.js:470:10)
at EventEmitter._tickCallback (node.js:192:40)
rm: key.publickey: No such file or directory
mv: rename key.secretkey to /Users/jbonacci/Git/browserid/scripts/../var/root.secretkey: No such file or directory