Can't install package with NPM behind proxy

Viewed 193

I'm trying to install Electron in NPM , using this command:

npm install --save-dev electron

But I always got :

npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! RequestError: read ECONNRESET

I configured the file .npmrc with following configs:

registry=http://registry.npmjs.org/
strict-ssl=false
proxy=http://mycompany.proxy:8080/
https-proxy=http://mycompany.proxy:8080/

But didn't resolve. I tried follow this guide: https://www.electronjs.org/docs/latest/tutorial/installation#proxies. So added ELECTRON_GET_USE_PROXY but same error.

I'm running npm within a MacOS BigSur.

0 Answers
Related