okTurtles / dnschain

A blockchain-based DNS + HTTP server that fixes HTTPS security, and more!
https://okturtles.com
Other
1.73k stars 169 forks source link

node vs nodejs #147

Closed tofutim closed 9 years ago

tofutim commented 9 years ago

Hi, I'm working on installing dnschain, but running into

gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.16.0-31-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/dnschain/node_modules/hiredis
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"

since 'node' is actually 'nodejs'. Is there a schedule for updating dnschain? Should I install nodejs-legacy?

taoeffect commented 9 years ago

Uh, where are you getting that error? What lead up to that?

FYI, this is likely coming not from DNSChain, but one of its dependencies (hiredis most likely). I'm guessing this is during install? It would still be helpful to see exactly the commands that lead up to this.

tofutim commented 9 years ago

It comes near the hiredis install. But I think it is because of binaryheap?

npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/optimist

> hiredis@0.2.0 install /usr/local/lib/node_modules/dnschain/node_modules/hiredis
> node-gyp rebuild

npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/binaryheap
npm http 304 https://registry.npmjs.org/binaryheap
gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.16.0-31-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/dnschain/node_modules/hiredis
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm http GET https://registry.npmjs.org/buffercursor
npm http 304 https://registry.npmjs.org/buffercursor
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/dnschain/node_modules/lodash/array'
npm ERR! error rolling back  dnschain@0.5.2 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/dnschain/node_modules/lodash/array']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/usr/local/lib/node_modules/dnschain/node_modules/lodash/array' }
npm ERR! weird error 1
npm ERR! Error: ENOENT, lstat '/home/tim/tmp/npm-7761-n-8g30Qn/1428032497153-0.38628569548018277/package/doc/scripts/sunlight-plugin.linenumbers.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
...
tofutim commented 9 years ago

I'm building on 14.04 LTS. Maybe it is too old. Anyway, the problem is resolved by apt-get install nodejs-legacy

taoeffect commented 9 years ago

See also my comment about using ln -s in your PR (to link nodejs -> node). Closing for now since you seem to have figured out a solution.