node-oracledb icon indicating copy to clipboard operation
node-oracledb copied to clipboard

ELIFECYCLE node-gyp rebuild failed during npm install oracledb

Open sbehun opened this issue 10 years ago • 2 comments

Please see the following Gist with the Dockerfile I used and my package.json: https://gist.github.com/sbehun/65ba5692fea7be9e0cff4d6f010e3acd

What error(s) you are seeing?

npm verb stack Error: [email protected] install: node-gyp rebuild
npm verb stack Exit status 1
npm verb stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
npm verb stack     at emitTwo (events.js:87:13)
npm verb stack     at EventEmitter.emit (events.js:172:7)
npm verb stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
npm verb stack     at emitTwo (events.js:87:13)
npm verb stack     at ChildProcess.emit (events.js:172:7)
npm verb stack     at maybeClose (internal/child_process.js:818:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
npm verb pkgid [email protected]
npm verb cwd /usr/src/app
npm ERR! Linux 4.4.0-24-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "--verbose"
npm ERR! node v4.2.3
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1

What exact command caused the problem (e.g. what command did you try to install with)? Who were you logged in as?

npm install, root

What environment variables did you set? How exactly did you set them?

See gist

What is your version of Node.js?

4.2.3

What is your version of the Oracle client (e.g. Instant Client)? How was it installed? Where it is installed?

12.1.0.2.0. Installed by downloading zip. See Dockerfile in gist for full list of commands used.

What is your OS and version?

debian:8

What compiler version did you use?

gcc (Debian 4.9.2-10) 4.9.2

sbehun avatar Jul 12 '16 16:07 sbehun

Other than Node 4.2 being 'old', nothing jumps out. Npm install logs are generally not helpful. But try npm --verbose install ... and see what you can deduce.

Did you check how other people installed this combination? Google has some hits.

cjbj avatar Jul 13 '16 02:07 cjbj

I added NODE_TLS_REJECT_UNAUTHORIZED=0 environment variable and it works now.

Turned out to be because node-gyp does not honor npm config options. It was trying to access https and due to my company proxy and root certificate, it could not get through.

sbehun avatar Jul 13 '16 15:07 sbehun