electron 我如何从代理后面安装电子js?

pbossiut  于 2022-12-16  发布在  Electron
关注(0)|答案(2)|浏览(167)

我已经尝试安装electronjs几次,但我一直无法,我背后的代理和每次尝试都返回以下错误

> electron@10.1.5 postinstall /home/dipper/Development/my-electron-app/node_modules/electron
> node install.js

RequestError: getaddrinfo EAI_AGAIN github.com github.com:443
    at ClientRequest.request.once.error (/home/dipper/Development/my-electron-app/node_modules/got/source/request-as-event-emitter.js:178:14)
    at Object.onceWrapper (events.js:286:20)
    at ClientRequest.emit (events.js:203:15)
    at ClientRequest.origin.emit.args (/home/dipper/Development/my-electron-app/node_modules/@szmarczak/http-timer/source/index.js:37:11)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at TLSSocket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm WARN enoent ENOENT: no such file or directory, open '/home/dipper/Development/my-electron-app/package.json'
npm WARN my-electron-app No description
npm WARN my-electron-app No repository field.
npm WARN my-electron-app No README data
npm WARN my-electron-app No license field.

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

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/dipper/.npm/_logs/2020-11-10T17_15_33_463Z-debug.log
h9a6wy2h

h9a6wy2h1#

尝试以下命令:

npx cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=<your proxy URL> npm install electron

检查此线程的更多信息和原始来源。

kuuvgm7e

kuuvgm7e2#

我通过更换连接的WiFi网络解决了这个问题,我将移动的数据与电脑共享,“NPM I Electronic”工作了。

相关问题