electron-quick-start icon indicating copy to clipboard operation
electron-quick-start copied to clipboard

npm install problem

Open VitoFanelli opened this issue 4 years ago • 13 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!

VitoFanelli avatar Dec 01 '21 16:12 VitoFanelli

HI, I also encountered this problem in window, Maybe you can try switching source

trty avatar Dec 23 '21 11:12 trty

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

trasherdk avatar Dec 29 '21 06:12 trasherdk

Try npm i --save-dev --production electron

reuzurq avatar Mar 18 '22 21:03 reuzurq

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.

ashutoshbhadoria avatar Mar 26 '22 17:03 ashutoshbhadoria

@VitoFanelli I would like to work on this issue, can you please assign it to me?

arya-vats avatar May 21 '22 04:05 arya-vats

@arya-vats I don't think there's an active task to work on with this issue.

erickzhao avatar May 21 '22 19:05 erickzhao

Well i was just trying to fix the old node modules that haven't been updated .

arya-vats avatar May 21 '22 19:05 arya-vats

fix the old node modules

Could you elaborate on this? I'm not sure I understand.

erickzhao avatar May 21 '22 21:05 erickzhao

In China, it may be a problem with the ladder. I set the ladder as a global agent and then installed it normally.

LiangXixixi avatar Jan 11 '23 02:01 LiangXixixi

In .npmrc config the following content:

ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"

then runnpm install

blade-demon avatar Mar 07 '23 14:03 blade-demon

Don't use China mirror sources, such as: taobao

hsibin avatar Apr 16 '23 06:04 hsibin

Don't use China mirror sources, such as: taobao

this works for me.

Llldmiao avatar Jul 29 '23 10:07 Llldmiao