Skip to content

Run npm install Behind Proxy

npm supports to run behind a proxy. Of course, we can set the proxy using command npm config set proxy or npm config set https-proxy which you can refer to https://stackoverflow.com/questions/7559648/is-there-a-way-to-make-npm-install-the-command-to-work-behind-proxy.

However, we may only want to use a proxy temporarily without change any configuration, thus, we can set proxy through the command line directly,

Bash
npm --proxy http://{user}:{pass}@{proxy_hpst}:{proxy_port} install