gruntjs / grunt-contrib-imagemin

Minify PNG, JPG, GIF and SVG images.
https://gruntjs.com
MIT License
1.21k stars 175 forks source link

Artifactory as a proxy/cache for npm registry #382

Closed JeanPerriault closed 7 years ago

JeanPerriault commented 7 years ago

Hello, I'm using artifactory as a proxy/cache for npm registry. I want to avoid latency due to network, and one the bottleneck is the internal proxy. So I've removed it from my .npmrc file. When retrieving npm packages, I've got this error.

> gifsicle@3.0.4 postinstall C:\Users\Test\Workspace\test\node_modules\gifsicle
> node lib/install.js

  ‼ connect ETIMEDOUT 151.101.56.133:443
  ‼ gifsicle pre-build test failed
  i compiling from source
  × RequestError: connect ETIMEDOUT 192.30.253.113:443
    at ClientRequest.<anonymous> (C:\Users\Test\Workspace\test\node_modules\got\index.js:74:21)
    at ClientRequest.g (events.js:292:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at TLSSocket.socketErrorListener (_http_client.js:309:9)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at emitErrorNT (net.js:1277:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

> jpegtran-bin@3.2.0 postinstall C:\Users\Test\Workspace\test\node_modules\jpegtran-bin
> node lib/install.js

  ‼ connect ETIMEDOUT 151.101.56.133:443
  ‼ jpegtran pre-build test failed
  i compiling from source
  × RequestError: connect ETIMEDOUT 216.34.181.59:443
    at ClientRequest.<anonymous> (C:\Users\Test\Workspace\test\node_modules\got\index.js:74:21)
    at ClientRequest.g (events.js:292:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at TLSSocket.socketErrorListener (_http_client.js:309:9)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at emitErrorNT (net.js:1277:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

> optipng-bin@3.1.4 postinstall C:\Users\Test\Workspace\test\node_modules\optipng-bin
> node lib/install.js

  ‼ connect ETIMEDOUT 151.101.56.133:443
  ‼ optipng pre-build test failed
  i compiling from source
  × RequestError: connect ETIMEDOUT 216.34.181.59:443
    at ClientRequest.<anonymous> (C:\Users\Test\Workspace\test\node_modules\got\index.js:74:21)
    at ClientRequest.g (events.js:292:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at TLSSocket.socketErrorListener (_http_client.js:309:9)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at emitErrorNT (net.js:1277:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

I've tried some workarounds:

Env:

JeanPerriault commented 7 years ago

Maybe there is a link with https://github.com/npm/npm/issues/17025, but in this case internet proxy is set.

sindresorhus commented 7 years ago

Closing as no new features will be added to this plugin.

subbiah2806 commented 6 years ago

I am facing this now, is there any solution. Exactly facing the same issue. we use private npm repository using npm config set registry https://npm.***.com