bluethundr
bluethundr

Reputation: 1345

npm install webdriver-sync fails

I'm running nodejs v0.12.2 on a RHEL 6.5 host. And I'm trying to install the webdriver-sync module with npm.

But when I go to do the install I'm running into this error:

root@206459673 ~]# npm install webdriver-sync
npm WARN package.json [email protected] assert is also the name of a node core module.

npm WARN package.json [email protected] No repository field.

> [email protected] install /root/node_modules/webdriver-sync/node_modules/java
> node-gyp rebuild

[node-java] Error: not found: javac
gyp: Call to 'node findJavaHome.js' 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/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 2.6.32-431.29.2.el6.x86_64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/webdriver-sync/node_modules/java
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok

> [email protected] install /root/node_modules/webdriver-sync/node_modules/selenium-binaries
> node ./lib/install.js


[selenium-binaries] Downloading selenium
[selenium-binaries] http://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar
[selenium-binaries]  -> /root/node_modules/webdriver-sync/node_modules/selenium-binaries/lib/selenium-binaries/selenium/2.45.0
[selenium-binaries] Status: 35269077 of 35269077
[selenium-binaries] Finished downloading http://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar

[selenium-binaries] Downloading chromedriver
[selenium-binaries] http://chromedriver.storage.googleapis.com/2.15/chromedriver_linux64.zip
[selenium-binaries]  -> /root/node_modules/webdriver-sync/node_modules/selenium-binaries/lib/selenium-binaries/chromedriver/2.15
[selenium-binaries] Status: 2281614 of 2281614
[selenium-binaries] Finished downloading http://chromedriver.storage.googleapis.com/2.15/chromedriver_linux64.zip
npm ERR! Linux 2.6.32-431.29.2.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "webdriver-sync"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the java 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 java
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/npm-debug.log

Could anyone offer some advice on how to get past this error?

Thanks!!

Upvotes: 0

Views: 974

Answers (1)

grdryn
grdryn

Reputation: 2017

I've just verified the suggestion that I made in my comment to the question. Installing an openjdk-devel package will allow you to install this package, as they're the packages that provide the javac command.

On CentOS 6.6 (I imagine CentOS 6.5 is pretty much the same in this regard), the following packages are available from the default repositories (you'll see a different extension than x86_64, if you're on a different architecture):

================== N/S Matched: openjdk-devel ===================
java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment

I ran sudo yum install java-1.8.0-openjdk-devel, then the webdriver-sync module from npm installed just fine.

Upvotes: 1

Related Questions