Skip to content
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

RequestError: read ECONNRESET #166

Open
maxbatur opened this issue Feb 11, 2024 · 0 comments
Open

RequestError: read ECONNRESET #166

maxbatur opened this issue Feb 11, 2024 · 0 comments

Comments

@maxbatur
Copy link

maxbatur commented Feb 11, 2024

To those who are struggling building plugin with RequestError: read ECONNRESET on Windows trying to build this plugin behind a proxy.

PS openlens-node-pod-menu> npm ci
(node:14488) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @material-ui/[email protected]: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.
npm WARN deprecated @material-ui/[email protected]: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.
npm WARN deprecated @material-ui/[email protected]: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.
npm ERR! code 1
npm ERR! path openlens-node-pod-menu\node_modules\electron
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
npm ERR! (node:39484) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
npm ERR! (Use `node --trace-warnings ...` to show where the warning was created)
npm ERR! RequestError: read ECONNRESET
npm ERR!     at ClientRequest.<anonymous> (openlens-node-pod-menu\node_modules\got\dist\source\core\index.js:970:111)
npm ERR!     at Object.onceWrapper (node:events:646:26)
npm ERR!     at ClientRequest.emit (node:events:538:35)
npm ERR!     at ClientRequest.origin.emit (openlens-node-pod-menu\node_modules\@szmarczak\http-timer\dist\source\index.js:43:20)
npm ERR!     at TLSSocket.socketErrorListener (node:_http_client:442:9)
npm ERR!     at TLSSocket.emit (node:events:526:28)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR!     at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)

From powershell:
$env:ELECTRON_GET_USE_PROXY=1
$env:GLOBAL_AGENT_HTTP_PROXY="proxy url here"
$env:GLOBAL_AGENT_HTTPS_PROXY="proxy url here"

ex.

$env:ELECTRON_GET_USE_PROXY=1
$env:GLOBAL_AGENT_HTTP_PROXY="http://127.0.0.1:3128"
$env:GLOBAL_AGENT_HTTPS_PROXY="http://127.0.0.1:3128"

Originally taken from: https://forum.snapcraft.io/t/electron-7-and-above-fails-to-install-with-getaddrinfo-enotfound-github-com-on-launchpad-build-snapcraft-io/20432/2

.npmrc
Add SDK for Win10 in VS installer, Win 11 SDK is not supported in this version

http-proxy=http://127.0.0.1:3128/
https-proxy=http://127.0.0.1:3128/
https_proxy=http://127.0.0.1:3128/
proxy=http://127.0.0.1:3128/
msbuild_path=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
registry=https://registry.npmjs.org/
PS openlens-node-pod-menu> node -v ; npm -v
v16.14.2
8.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant