Environment: Vagrant box running CentOS 7.2 on a windows 7 machine
â—‹ node -v
v6.10.3
â—‹ npm -v
5.0.1
command I am running when I get the error:
npm install kafka-node --save --no-bin-links
error:
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: certificate has expired
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)
gyp ERR! stack at emitNone (events.js:86:13)
gyp ERR! stack at TLSSocket.emit (events.js:185:7)
gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:610:8)
gyp ERR! stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
gyp ERR! System Linux 3.10.0-327.13.1.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /vagrant/node_modules/node-kafka
gyp ERR! node -v v6.10.3
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
npm WARN ETXTBSY: text file is busy, rmdir '/vagrant/node_modules/node-kafka'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2017-06-06T16_12_08_724Z-debug.log
First mention of errors in the above listed log file:
51 info lifecycle [email protected]~install: [email protected]
52 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle true
53 verbose lifecycle [email protected]~install: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/vagrant/node_modules/node-kafka/node_modules/.bin:/vagrant/node_modules/.bin:vendor/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
54 verbose lifecycle [email protected]~install: CWD: /vagrant/node_modules/node-kafka
55 silly lifecycle [email protected]~install: Args: [ '-c', 'node-gyp rebuild' ]
56 silly lifecycle [email protected]~install: Returned: code: 1 signal: null
57 info lifecycle [email protected]~install: Failed to exec install script
58 verbose unlock done using /home/vagrant/.npm/_locks/staging-db29c5a769436947.lock for /vagrant/node_modules/.staging
59 warn ETXTBSY: text file is busy, rmdir '/vagrant/node_modules/node-kafka'
60 verbose stack Error: [email protected] install: `node-gyp rebuild`
60 verbose stack Exit status 1
60 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
60 verbose stack at emitTwo (events.js:106:13)
60 verbose stack at EventEmitter.emit (events.js:191:7)
60 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
60 verbose stack at emitTwo (events.js:106:13)
60 verbose stack at ChildProcess.emit (events.js:191:7)
60 verbose stack at maybeClose (internal/child_process.js:886:16)
60 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
61 verbose pkgid [email protected]
62 verbose cwd /vagrant
63 verbose Linux 3.10.0-327.13.1.el7.x86_64
64 verbose argv "/usr/bin/node" "/bin/npm" "install" "node-kafka" "--save" "--no-bin-links"
65 verbose node v6.10.3
66 verbose npm v5.0.1
67 error code ELIFECYCLE
68 error errno 1
69 error [email protected] install: `node-gyp rebuild`
69 error Exit status 1
70 error Failed at the [email protected] install script.
70 error This is probably not a problem with npm. There is likely additional logging output above.
71 verbose exit [ 1, true ]
I have found people with similar errors are deleting $HOME/.node-gyp/ then running an npm update, I tried this and it did not fix the issue. Any suggestions would be much appreciated.
Feel free to close this, I am behind a very strict corporate firewall and I had to use the "hack":
export NODE_TLS_REJECT_UNAUTHORIZED=0
I know this exposes for MitM attack, but this application will never face the web.
Thank you!
Most helpful comment
Feel free to close this, I am behind a very strict corporate firewall and I had to use the "hack":
export NODE_TLS_REJECT_UNAUTHORIZED=0I know this exposes for MitM attack, but this application will never face the web.
Thank you!