npm install problem
VitoFanelli opened this issue · comments
Hi, i clone the repository and change directory but when i run npm install by windows command prompt i get this errror
npm ERR! path C:\Users\vitof\electron-quick-start\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. (C:\Users\vitof\electron-quick-start\node_modules\got\source\request-as-event-emitter.js:178:14)
npm ERR! at Object.onceWrapper (node:events:510:26)
npm ERR! at ClientRequest.emit (node:events:402:35)
npm ERR! at ClientRequest.origin.emit (C:\Users\vitof\electron-quick-start\node_modules@szmarczak\http-timer\source\index.js:37:11)
npm ERR! at TLSSocket.socketErrorListener (node:_http_client:447:9)
npm ERR! at TLSSocket.emit (node:events:390: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)
Can you help me?
Thank you!
HI, I also encountered this problem in window, Maybe you can try switching source
I'm running in Git bash
with no problem:
admin@ACER-64BIT MINGW64 /c/Workspace/Github/electron-quick-start (master)
$ node -v && npm -v
v16.13.1
8.3.0
and
$ npm install
up to date, audited 87 packages in 2s
5 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Try
npm i --save-dev --production electron
In windows system you can use this workaround.
- Powershell
$env:NODE_TLS_REJECT_UNAUTHORIZED=0
- CMD
set NODE_TLS_REJECT_UNAUTHORIZED=0
Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
@VitoFanelli I would like to work on this issue, can you please assign it to me?
@arya-vats I don't think there's an active task to work on with this issue.
Well i was just trying to fix the old node modules that haven't been updated .
fix the old node modules
Could you elaborate on this? I'm not sure I understand.
In China, it may be a problem with the ladder. I set the ladder as a global agent and then installed it normally.
In .npmrc config the following content:
ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
then runnpm install
Don't use China mirror sources, such as: taobao
Don't use China mirror sources, such as: taobao
this works for me.