tencent cloud

Low-code Interactive Classroom

Política LCIC
Política de privacidade
Contrato de segurança e processamento de dados
Service Agreement
Service Level Agreement
DocumentaçãoLow-code Interactive Classroom

Electron

Modo Foco
Tamanho da Fonte
Última atualização: 2023-03-24 15:29:26

Why is Electron download slow or even stuck?

When download of the dependency package starts, it may be very slow, and a timeout error of npm even occurs after I wait for a long time.


Solution A

If you work from an office in your company, you need to check whether the proxy configuration of npm points to the proxy server of your company and whether the ELECTRON_GET_USE_PROXY environment variable is configured, and if not, perform the following steps:

1. Set the npm proxy: npm config set all_proxy=[your proxy address].
2. Configure the ELECTRON_GET_USE_PROXY environment variable, so that the Electron installation script will be downloaded through the npm proxy.


Solution B

If you use macOS, run the following command:
$ export ELECTRON_GET_USE_PROXY=true

Solution C

If you use Windows:
1. Right-click PC > System Properties> Advanced > Environment Variables.
2. Set the environment variable ELECTRON_GET_USE_PROXY as shown below and run npm install or npm install --proxy=[your proxy address]:



Ajuda e Suporte

Esta página foi útil?

comentários