npm install fails with bad signature error on Windows
Asked Answered
D

3

19

I am using nvm to manage my node versions. I have a project that users node 6.10.2. With something as simple as npm install -g gulp I get the following error:

write EPROTO 101057795:error:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature:openssl\ssl\s3_clnt.c:20

I have added strict-ssl false to my config which hasn't helped. I am not behind a proxy, I have tried it behind my corporate firewall, home network and even my mobile hotspot, all with the same error. I changed to use http:// instead of https:// using npm config set registry http://registry.npmjs.org/ which gets me past the gulp error but then with other packages the error returns (presumably because they are pulling from a different registry). And using http:// worries me about security anyway.

I get the same results with node 6.10.2 and 7.4.0. If I jump to the latest node, 12.18.0 the errors don't happen, but the project I'm working on does not support that new of node version. At a loss as to what else to try.

This is the error part of the npm-debug.log file:

103 verbose stack Error: write EPROTO 101057795:error:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature:openssl\ssl\s3_clnt.c:2032:
103 verbose stack
103 verbose stack     at exports._errnoException (util.js:1018:11)
103 verbose stack     at WriteWrap.afterWrite (net.js:804:14)
104 verbose cwd C:\code\extraspace.web.pointofsale
105 error Windows_NT 10.0.18363
106 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp"
107 error node v6.10.2
108 error npm  v3.10.10
109 error code EPROTO
110 error errno EPROTO
111 error syscall write
112 error write EPROTO 101057795:error:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature:openssl\ssl\s3_clnt.c:2032:
Derward answered 3/6, 2020 at 17:21 Comment(2)
Hi Sledguy. Did you ever resolve this problem? I am getting exactly the same issue as you had on a brand new Windows 10 machine. The suggestions below haven't helped me. Thanks.Dunlap
solved here - https://mcmap.net/q/668599/-windows-10-with-early-build-npm-fails-to-install-any-modules-due-to-39-bad-signature-39/1061426. u need to use 32 bit 7.x.y to make your old node work, who knows why.Zuleika
E
1

Disclaimer: Not so experienced with Nodejs and the answers I give are my own research about the issue hoping to help you in a way.

References: write-eproto-101057795... or common-proxy-and-networking-p...

First check if Nodejs is properly installed

- Open Command Prompt (Windows) or Terminal (Mac) or Bash (Linux)
- Execute this command: node -v (The output should be "6.10.2")
- Execute this command: npm -v (The output should be "(some-version)")

Try this:

- Open Command Prompt (Windows) or Terminal (Mac) or Bash (Linux)
- Go to the "app" folder (Located on the same folder of this file)
- Execute this command (*): npm install --development
- Execute this command: npm start --development

If all the above fail, check this list below.

  1. Make sure you have a working internet connection. Can you reach https://registry.npmjs.org? Can you reach other sites? If other sites are unreachable, this is not a problem with npm.
  2. Check http://status.npmjs.org/ for any potential current service outages.
  3. If your company has a process for domain whitelisting for developers, make sure https://registry.npmjs.org is a whitelisted domain.
  4. If you’re in China, consider using https://npm.taobao.org/ as a registry, which sits behind the Firewall.
  5. On Windows, npm does not access proxies configured at the system level, so you need to configure them manually in order for npm to access them. Make sure you have added the appropriate proxy configuration to .npmrc.
  6. If you already have a proxy configured, it might be configured incorrectly or use the wrong credentials. Verify your credentials, test the specific credentials with a separate application.
  7. The proxy itself, on the server, might also have a configuration error. In this case, you’ll need to work with your system administrator to verify that the proxy, and HTTPS, are configured correctly. You may test it by running regular HTTPS requests.
Erivan answered 3/12, 2021 at 7:15 Comment(2)
Would like also to know if my answer helped. Or if there is another way around it, thanks.Erivan
This info was helpful to me... However, there are other options such as telling NPM to just trust self signed certificates. I think Zscaler and other security software use a self signed certificate in the cert chain to spy on employees which sort of messes up the SSL checks in npm and other package managers.Imprecise
F
0

from your error log

...
...
107 error node v6.10.2
108 error npm  v3.10.10
...
...

Your npm and nodejs versions are very old. Try to upgrade npm and nodejs versions.

also try

//disable strict ssl checking
npm config set strict-ssl false
//if you're using different npm registry try official registry for debug
npm config set registry https://registry.npmjs.org/
Faculty answered 28/2, 2022 at 10:6 Comment(0)
H
0

I got resolved by using a higher version of the node like previously I was using 6.9.0 now I switched to 12.14.1

nvm list

Haemostatic answered 10/5 at 7:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.