electron: Electron download failed

Error detail

> electron@7.1.2 postinstall 
.../node_modules/electron
> node install.js

(node:99449) UnhandledPromiseRejectionWarning: HTTPError: Response code 404 (Not Found)
    at EventEmitter.emitter.on.response (.../node_modules/@electron/get/node_modules/got/source/as-stream.js:35:24)
    at EventEmitter.emit (events.js:182:13)
    at module.exports (.../node_modules/@electron/get/node_modules/got/source/get-response.js:22:10)
    at ClientRequest.handleResponse (.../node_modules/@electron/get/node_modules/got/source/request-as-event-emitter.js:155:5)
    at Object.onceWrapper (events.js:273:13)
    at ClientRequest.emit (events.js:187:15)
    at ClientRequest.origin.emit.args [as emit] (.../node_modules/@szmarczak/http-timer/source/index.js:37:11)
    at HTTPParser.parserOnIncomingClient (_http_client.js:546:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
    at TLSSocket.socketOnData (_http_client.js:432:20)
(node:99449) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:99449) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

npm configuration

npm config get registry                           

https://registry.npmjs.org/

The same error occurred when I used taobao(https://registry.npm.taobao.org/) mirror source

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (3 by maintainers)

Most upvoted comments

add path.txt to node_modules/elelctron directory, and write electron or electron.exe into the file, Then, manually download electron, unzip to node_modules/electron/dist.

建个path.txt放到node_modules/electron文件夹下, electron或electron.exe写进去。 手动去下载对应版本的electron解压到electron/dist文件夹下。

I’m getting this failing silently as well. It’s a proxy issue it would seem.

work for me ~ ↓

code ~/.npmrc

add these:

electron_mirror=https://cdn.npm.taobao.org/dist/electron/
electron_custom_dir=7.1.9