-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gyp ERR! stack Error: unable to get local issuer certificate #979
Comments
Are you behind a proxy? What does |
Thank you so much for your reply@bnoordhuis Yes I am behind the proxy I did everything.Still my issue is not resolve.I downgrade node version to 6.9.4 but still not resolve when i did npm config get I got this.Can you help me. ; cli configs ; userconfig C:\Users\sK.npmrc ; globalconfig C:\Users\sK\AppData\Roaming\npm\etc\npmrc ; builtin config undefined ; node bin location = C:\Program Files\nodejs\node.exe |
Your company's proxy seems to use a certificate that is signed by a custom CA. Update the Aside: I see you disabled |
A question to you if you'll allow me:
Did you set that yourself or did windows-build-tools do that? |
Answered and no follow-up, closing. |
This problem is caused by the download function in the install.js file for node-gyp. WORKAROUND: To force node-gyp to ignore self-signed certificate, you need to modify the download function so that the requestOpts Object includes the following variable: rejectUnauthorized: false The install.js file can be found here: %APPDATA%\npm\node_modules\npm\node_modules\node-gyp\lib\install.js The patched function looks like this:
|
Sorry, but that's terrible advice. If you have a self-signed certificate, you might as well stop using HTTPS; it offers no security. If the certificate is signed by a self-signed CA, use the |
Hi guys, Thanks again for your help (keep up the good work and be patient) |
If people still come here with this error, this is what solved it for me:
Note: node-gyp configure can give an error gyp: binding.gyp not found, but it's ok. I can clearly reproduce the behavior, if I reset my local environment:
|
Thanks for this, it has also worked for me on my Windows dev machine. Any idea as to how/why this works? I am having the same issue trying to install in a docker container and running node-gyp configure is breaking the build by returning a -1 error code (the binding.gyp not found issue you mentioned) |
I guess that node-gyp does not work properly behind a proxy without the certificate configured, so you can provide the certificate with: Also see: https://stackoverflow.com/questions/33293960/how-to-setup-node-gyp-behide-a-proxy |
Another dirty but simply works solution: |
Having tried everything here, I am still getting the error:
|
You can add below in Project directory Command Prompt -npm config set strict-ssl false It's work 100% |
Hello together I also had a similar issue but it would be very interessting to know what this "gyp" component really wants. The errormessage says: It would be interessting to know:
Its very unclear from the answers what this component actually wants, and as you already pointet out just deactivating ssl ist not a solution. And for my personal interesset it would also be good to know "what Im doing" instead of just copying stuff or inserting commands I have no clue what they do. I hope I can find the solution by research, for other people it could be interessting to post it here this is still the first hit in the internet when googling the error. |
My company uses ZScaler for internet traffic proxy & monitoring. In addition to declaring These proxies are really insecure as they are breaking the SSL chain (from what I can tell it's basically doing a man in the middle attack), but I'm not in charge of corporate IT security, so... |
Do this first: even u getting the error then do this: |
Or you can run node with the option
|
Hi, got the same error none of above helped. Maybe someone have other solution? |
For anyone using ZScaler, the workaround is to use the "disable for 30 seconds" option. |
We are getting the error when using an electron application to connect to our server. Windows 10 computer , our package is build in electron 16.0.7 |
When I used npm install -g curlconverter --verbose, I encountered an error |
I am facing this issue I searched on internet almost 2 days but my issue is not resolved can anyone help me Below I am attesting what error I am facing I did everything what I searched on net.
npm install
C:\Users\sKatare\Desktop\product\node_modules\oracledb>if not defined npm_config_node_gyp (node "C:\Users\sKatare\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" 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. (_tls_wrap.js:1103:38)
gyp ERR! stack at emitNone (events.js:106:13)
gyp ERR! stack at TLSSocket.emit (events.js:208:7)
gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:637:8)
gyp ERR! stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:467:38)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\sKatare\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\sKatare\Desktop\product\node_modules\oracledb
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
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:
The text was updated successfully, but these errors were encountered: