0

When I try to install sails-postgresql@0.9.7 package on openshift, I have the following issue.

node-gyp rebuild || (exit 0)

Traceback (most recent call last):
  File "/opt/rh/nodejs010/root/usr/bin/gyp", line 15, in <module>
    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:417:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Linux 2.6.32-431.11.2.el6.bz844450.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 /var/lib/openshift/537909f250044640820000a5/app-root/runtime/dependencies/nodejs/node_modules/sails-postgresql/node_modules/pg
gyp ERR! node -v v0.10.5
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok 
elyrico
  • 519
  • 6
  • 19

2 Answers2

1

My issue appeared when I was trying to add my package manually with the following command npm install sails-postgresql But if I declare the sails-postgresql package in my dependencies (package.json), the package is automatically installed during the deployment without problem.

elyrico
  • 519
  • 6
  • 19
0

Trace back says you don't have gyp installed. Install it and try again.

fat fantasma
  • 7,483
  • 15
  • 48
  • 66