redis/hiredis-node

Install Issues on OpenShift

unerh opened this issue · 2 comments

unerh commented

Hi there,

I'm running into some issues with installing (or deploying) hiredis on OpenShift. I can successfully install on Ubuntu 12.04 LTS, using the same node (v0.10.35) and npm (1.4.28) version. But the build on OpenShift (Red Hat Enterprise Linux Server release 6.6) gives the following error. Could anyone point me to what might be missing on OpenShift?

[freestyle@freestyle-ose fmemanager]$ npm install hiredis
/

hiredis@0.4.0 install /home/freestyle/openshift/online/fmemanager/node_modules/hiredis
node-gyp rebuild

Traceback (most recent call last):
File "/opt/rh/v8314/root/usr/bin/gyp", line 15, in
import gyp
ImportError: No module named gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/opt/rh/nodejs010/root/usr/lib/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 2.6.32-504.23.4.el6.x86_64
gyp ERR! command "node" "/opt/rh/nodejs010/root/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/freestyle/openshift/online/fmemanager/node_modules/hiredis
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

npm ERR! hiredis@0.4.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hiredis@0.4.0 install script.
npm ERR! This is most likely a problem with the hiredis 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 hiredis
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-504.23.4.el6.x86_64
npm ERR! command "node" "/opt/rh/nodejs010/root/usr/bin/npm" "install" "hiredis"
npm ERR! cwd /home/freestyle/openshift/online/fmemanager
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

File "/opt/rh/v8314/root/usr/bin/gyp", line 15, in 
import gyp
ImportError: No module named gyp

It seems to invoke gyp in the mentioned path, which fails for some reason.
Normally node-gyp should invoke the gyp it comes with, but maybe because you have a global one installed, this fails.

unerh commented

Just an update. The problem is with the Node version on OpenShift. Here is my finding for anyone else that might be facing the same issues:

  1. Installs, builds and runs fine on Ubuntu 12.02 (Node: v0.10.35)
  2. Fails building on OpenShift Online (same Node version), therefore cannot deploy.
  3. I used nvm to explicitly install Node v0.10.35 locally and it builds and runs fine on RedHat and Ubuntu, and deploys to OpenShift Online without an issue.