How to setup node-gyp behide a proxy

JimiOr2 picture JimiOr2 · Oct 23, 2015 · Viewed 10.1k times · Source

When i install karma that use node-gyp to fetch package and do rebuild, and I got a "gyp Error!: connect ECONNERFUSED", THE problem whey node-gyp will connect to internet and my environment is behind corporate proxy, I could download package from npm and I setup npm's proxy already.

My environment is WINDOWS 7 64 bit.

I found no where to setting node-gyp in proxy. any idea for that?

[Update] Thanks. I got how to setup this, command as below node-gyp configure --proxy=http://proxy.address.com:port

node-gyp connect ECONNERFUSED

Answer

Tim picture Tim · May 24, 2019

I am stuck behind a corporate firewall. The only solution I could find was to override the default SSL CA files with the company provided ones.

Solution using company ssl CA files: node-gyp configure --cafile="/path/to/mycafile.pem"