NPM error install Electron

I run on Ubuntu 18.04 NodeJS v10.15.1 and NPM 6.7.0. Iā€™m behind a proxy but is configured and i can install others Package like Express, but for Electron I have this issues

> node install.js

Downloading tmp-2998-0-electron-v4.0.4-linux-x64.zip
Error: tunneling socket could not be established, statusCode=502
/home/julien/node_modules/electron/install.js:49
  throw err
  ^

Error: tunneling socket could not be established, statusCode=502
    at ClientRequest.onConnect (/home/julien/node_modules/tunnel-agent/index.js:166:19)
    at Object.onceWrapper (events.js:277:13)
    at ClientRequest.emit (events.js:189:13)
    at Socket.socketOnData (_http_client.js:475:11)
    at Socket.emit (events.js:189:13)
    at addChunk (_stream_readable.js:284:12)
    at readableAddChunk (_stream_readable.js:265:11)
    at Socket.Readable.push (_stream_readable.js:220:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
npm WARN enoent ENOENT: no such file or directory, open '/home/julien/package.json'
npm WARN julien No description
npm WARN julien No repository field.
npm WARN julien No README data
npm WARN julien No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@4.0.4 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@4.0.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

The postinstall script of Electron is downloading a binary from a non-npm domain (possibly github.com), for which the proxy may not be configured.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.