Prebuild-install WARN install unable to get local issuer certificate

Please suggest solution to resolve this to npm install couchbase for nodejs

prebuild-install WARN install unable to get local issuer certificate

E:\Naveen\Framework\UI\UI\node_modules\couchbase>if not defined npm_config_node_gyp (node “C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to get local issuer certificate
gyp ERR! stack at TLSSocket.onConnectSecure (_tls_wrap.js:1058:34)
gyp ERR! stack at TLSSocket.emit (events.js:198:13)
gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:636:8)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
gyp ERR! cwd E:\Naveen\Framework\UI\UI\node_modules\couchbase
gyp ERR! node -v v10.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN cet-autogenerate@0.0.1 No repository field.

npm ERR! errno 1
npm ERR! couchbase@3.1.1 install: prebuild-install || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the couchbase@3.1.1 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! C:\Users\10661841\AppData\Roaming\npm-cache_logs\2021-03-04T07_08_51_718Z-debug.log

hello @Naveen_Asapu welcome to the forums, are you trying to install nodejs sdk ? which version would that be ? What OS is that and which CB server are you trying to connect against ?

Hi @Naveen_Asapu ,

Can you follow below steps,

npm install -g node-gyp

after install the npm packages.

1 Like