1

I've cloned node-java and when I run node-gyp configure build or npm install, I get the error below. My JAVA_HOME is set to: /opt/java/jdk1.7/latest and works fine for some Java applications. I'm using Ubuntu 14.04.2 LTS

gyp: Call to 'node findJavaHome.js' returned exit status 127. 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.13.0-55-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "configure" "build"
gyp ERR! cwd /home/dev/temp/node-java
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok 
user994165
  • 9,146
  • 30
  • 98
  • 165
  • 1
    https://github.com/joeferner/node-java#installation: _"If you see an error such as "Call to 'node findJavaHome.js' ..."_ – robertklep Jul 07 '15 at 16:40

1 Answers1

3

This was due to the node/nodejs naming issue on Ubuntu. I got around the error by executing:

sudo ln -s /usr/bin/nodejs /usr/bin/node

although there's a different preferred solution here: nodejs vs node on ubuntu 12.04

Community
  • 1
  • 1
user994165
  • 9,146
  • 30
  • 98
  • 165