I got below error when trying to build the microsoft driver for nodejs for sql server
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp http GET https://nodejs.org/download/release/v5.3.0/node-v5.3.0-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: self signed certificate in certificate chain
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket. (_tls_wrap.js:1057:38)
gyp ERR! stack at emitNone (events.js:67:13)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at TLSSocket._fini
enter code here
shInitgyp ERR! not ok "
i tried with below workaround but it dint work
1) upgrade your version of npm
npm install npm -g --ca=null
- or -
2) tell your current version of npm to use known registrars
npm config set ca=""
Can anyone guide me how to resolve this certificate issue
Came across the same problem when node-gyp
starts compiling node.js
addons source. And as @mujimu suggested, fixed it setting a shell variable NODE_TLS_REJECT_UNAUTHORIZED
value to 0
before executing npm install
, as follows:
$ set NODE_TLS_REJECT_UNAUTHORIZED=0
$ npm install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With