0

I have been trying to install electron for my react app but it kept on giving me this error

npm ERR! code 1
npm ERR! path C:\Users\addis\Desktop\Nigerian-navy-publications\nigerian-navy-publications\node_modules\electron
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
npm ERR! RequestError: read ECONNRESET
npm ERR!     at ClientRequest.<anonymous> (C:\Users\addis\Desktop\Nigerian-navy-publications\nigerian-navy-publications\node_modules\got\dist\source\core\index.js:970:111)      
npm ERR!     at Object.onceWrapper (node:events:629:26)
npm ERR!     at ClientRequest.emit (node:events:526:35)
npm ERR!     at origin.emit (C:\Users\addis\Desktop\Nigerian-navy-publications\nigerian-navy-publications\node_modules\@szmarczak\http-timer\dist\source\index.js:43:20)
npm ERR!     at TLSSocket.socketErrorListener (node:_http_client:495:9)
npm ERR!     at TLSSocket.emit (node:events:514:28)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR!     at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)

npm ERR! A complete log of this run can be found in: C:\Users\addis\AppData\Local\npm-cache\_logs\2024-02-15T19_46_59_700Z-debug-0.log

I have tried npm cache clean --force, deleted node-modules & package-lock.json, but nothing worked. I even deleted the log file where it says a complete log of the run can be found but the file kept getting recreated whenever i tried to install again but with the same error. I tried other electron alternatives but the error persisted.

I have tried deleting electron from node-modules, deleted the node-modules folder entirely along side the package-lock.json file in order to run a fresh install, npm cache clean --force, npm cache clean, tried to install other packages to see if the error was just with electron but i kept on recieving the same error.

1 Answer 1

0

ECONNRESET is a network error, it appears that something has a post install hook script that is trying to make a connection to a remote machine and the connection is failing.

You should read the log file to determine which package is being installed at the time and look at the source to see where it is trying to connect to.

Not the answer you're looking for? Browse other questions tagged or ask your own question.