-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] npm fails to install package npm ERR! errno EPROTO #6070
Comments
Likely your connecting to a server or through a proxy of some sort that uses legacy SSL options. This is a network or registry configuration issue. |
@fritzy, what would be the workaround or solution for this? Because I agree it's a network issue for me and the network won't change anything because they see a security issue in how NPM is pulling down packages. This is from the my network IT folks:
This re-signing of the packages is what is causing a security issue for us. And they don't see a workaround on their end. |
Re-signing traffic like that is a security issue; they’re explicitly being a “man in the middle”. |
Is there any workaround? I understand this is a network issue, and I agree the solution should be not to re-sign cetificates, but that's something many companies do for some reason (I'm not a network engineer so I can't think of any valid reason, but maybe there's one). Shouldn't at least exists a last resource "allow unsafe renegotiation at your own risk" option? Right now, the only workaround is to not use node > v18 |
I agree with @lucas-labs there are organizations that do not trust the public NPM registry to contain safe non-malicious software. So it's only naturally that they want to scan the contents for any threats. |
fwiw the only reasonable way to do this is an internal registry, and NOT to hijack SSL traffic. |
No love for the people behind a corporate firewall and intercepting proxy? Fear not!
|
Is there a way to set
(or the newer unsafe server connect) |
Maybe this is relevant to make the above said configuration effective:
🤨🧐🤔 It should be
etc... as @camAtGitHub wrote: I'll try asap. |
Nope :-( I still get an error localhost:~/node/test# npm i node-fetch --loglevel verbose
npm verb cli /usr/bin/node /usr/bin/npm
npm info using npm@10.4.0
npm info using node@v20.11.1
npm verb title npm i node-fetch
npm verb argv "i" "node-fetch" "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:/root/.npm/_logs/2024-02-29T08_04_10_081Z-
npm verb logfile /root/.npm/_logs/2024-02-29T08_04_10_081Z-debug-0.log
npm verb type system
npm verb stack FetchError: request to https://registry.npmjs.org/node-fetch failed, reason: A86959FFCD7F0000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:ssl/statem/extensions.c:892:
npm verb stack
npm verb stack at ClientRequest.<anonymous> (/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
npm verb stack at ClientRequest.emit (node:events:518:28)
npm verb stack at _destroy (node:_http_client:875:13)
npm verb stack at onSocketNT (node:_http_client:895:5)
npm verb stack at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
npm verb cwd /root/node/test
npm verb Linux 6.6.14-0-lts
npm verb node v20.11.1
npm verb npm v10.4.0
npm ERR! code ERR_SSL_UNSAFE_LEGACY_RENEGOTIATION_DISABLED
npm ERR! errno ERR_SSL_UNSAFE_LEGACY_RENEGOTIATION_DISABLED
npm ERR! request to https://registry.npmjs.org/node-fetch failed, reason: A86959FFCD7F0000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:ssl/statem/extensions.c:892:
npm ERR!
npm verb exit 1
npm verb unfinished npm timer reify 1709193850421
npm verb unfinished npm timer reify:loadTrees 1709193850426
npm verb code 1
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-02-29T08_04_10_081Z-debug-0.log
I see that this is not a pure node issue, because
does work while
throws hence the node started from npm is not getting the right config for some reason... 🎉 OK, finally solved ❤️ , I had a typo in my I confirm it now works with
|
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm fails to install any packages and gives following errors:
14:08:30:276 ====Executing command 'npm install react-dom --save-prod '====
14:08:30:276
14:09:43:819 npm ERR! code EPROTO
14:09:43:821 npm ERR! syscall write
14:09:43:824 npm ERR! errno EPROTO
14:09:43:826 npm ERR! request to https://registry.npmjs.org/react-dom failed, reason: write EPROTO C84A0000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:c:\ws\deps\openssl\openssl\ssl\statem\extensions.c:922:
14:09:43:827 npm ERR!
14:09:43:828 npm ERR! A complete log of this run can be found in:
14:09:43:829 npm ERR! C:\Users\Whaley\AppData\Local\npm-cache_logs\2023-01-19T20_08_32_441Z-debug-0.log
14:09:43:843
14:09:43:843 ====npm command completed with exit code 1====
14:09:43:843
Expected Behavior
Expect packages to install
Steps To Reproduce
14:08:30:276
14:09:43:819 npm ERR! code EPROTO
14:09:43:821 npm ERR! syscall write
14:09:43:824 npm ERR! errno EPROTO
14:09:43:826 npm ERR! request to https://registry.npmjs.org/react-dom failed, reason: write EPROTO C84A0000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:c:\ws\deps\openssl\openssl\ssl\statem\extensions.c:922:
14:09:43:827 npm ERR!
14:09:43:828 npm ERR! A complete log of this run can be found in:
14:09:43:829 npm ERR! C:\Users\Whaley\AppData\Local\npm-cache_logs\2023-01-19T20_08_32_441Z-debug-0.log
14:09:43:843
14:09:43:843 ====npm command completed with exit code 1====
14:09:43:843
Environment
The text was updated successfully, but these errors were encountered: