windows 7, [email protected], [email protected]
npm and git are set up for using the corporate proxy. It took me a while to figure out how git and npm can use the corporate proxy, luckily it was successful done. npm config file (.npmrc) looks like:
strict-ssl=false
proxy=http://domain%5Cmyname:mypassword@corporateproxy:8088/
http-proxy=http://domain%5Cmyname:mypassword@corporateproxy:8088/
https-proxy=http://domain%5Cmyname:mypassword@corporateproxy:8088/
cache-lock-wait=30000
cache-lock-retries=10
cache-lock-stale=300000
start installation
npm install gifsicle --verbose
and here is the logging:
C:\temp\2018_0110\estatico>npm install gifsicle --verbose
npm info it worked if it ends with ok
npm verb cli [ 'C:\\temp\\TOOLS\\PortableNode\\node.exe',
npm verb cli 'C:\\temp\\TOOLS\\PortableNode\\node_modules\\npm\\bin\\npm-cli.j
s',
npm verb cli 'install',
npm verb cli 'gifsicle',
npm verb cli '--verbose' ]
npm info using [email protected]
npm info using [email protected]
npm verb request uri https://registry.npmjs.org/gifsicle
npm verb request no auth needed
npm info attempt registry request try #1 at 09:00:29
npm verb request id 7014dcca318052d1
npm verb etag "5a108ad8-73b8"
npm verb lastModified Sat, 18 Nov 2017 19:32:40 GMT
npm http request GET https://registry.npmjs.org/gifsicle
npm http 304 https://registry.npmjs.org/gifsicle
npm verb headers { date: 'Wed, 17 Jan 2018 08:00:14 GMT',
npm verb headers via: '1.1 varnish',
npm verb headers 'cache-control': 'max-age=300',
npm verb headers etag: '"5a108ad8-73b8"',
npm verb headers age: '13585',
npm verb headers connection: 'close',
npm verb headers 'x-served-by': 'cache-hhn1546-HHN',
npm verb headers 'x-cache': 'HIT',
npm verb headers 'x-cache-hits': '10',
npm verb headers 'x-timer': 'S1516176014.461012,VS0,VE0',
npm verb headers vary: 'Accept-Encoding, Accept' }
npm verb etag https://registry.npmjs.org/gifsicle from cache
npm verb get saving gifsicle to C:\Users\MYUSERHOME\AppData\Roaming\npm-cach
e\registry.npmjs.org\gifsicle\.cache.json
npm verb correctMkdir C:\Users\MYUSERHOME\AppData\Roaming\npm-cache correctM
kdir not in flight; initializing
npm verb cache add spec gifsicle
npm verb addNamed "latest" is being treated as a dist-tag for gifsicle
npm info addNameTag [ 'gifsicle', 'latest' ]
npm verb addNameTag registry:https://registry.npmjs.org/gifsicle not in flight;
fetching
npm verb get https://registry.npmjs.org/gifsicle not expired, no request
npm verb addNamed "3.0.4" is a plain semver version for gifsicle
npm verb afterAdd C:\Users\MYUSERHOME\AppData\Roaming\npm-cache\gifsicle\3.0
.4\package\package.json not in flight; writing
npm verb correctMkdir C:\Users\MYUSERHOME\AppData\Roaming\npm-cache correctM
kdir not in flight; initializing
npm verb afterAdd C:\Users\MYUSERHOME\AppData\Roaming\npm-cache\gifsicle\3.0
.4\package\package.json written
npm verb correctMkdir C:\Users\MYUSERHOME\AppData\Roaming\npm-cache\_locks c
orrectMkdir not in flight; initializing
npm verb lock using C:\Users\MYUSERHOME\AppData\Roaming\npm-cache\_locks\sta
ging-fdad36d07e8f1a67.lock for C:\temp\2018_0110\estatico\node_modules\.staging
npm verb unbuild node_modules\.staging\gifsicle-c326b995
npm verb gentlyRm don't care about contents; nuking C:\temp\2018_0110\estatico\n
ode_modules\.staging\gifsicle-c326b995
npm verb tar unpack C:\Users\MYUSERHOME\AppData\Roaming\npm-cache\gifsicle\3
.0.4\package.tgz
npm verb tar unpacking to C:\temp\2018_0110\estatico\node_modules\.staging\gifsi
cle-c326b995
npm verb gentlyRm don't care about contents; nuking C:\temp\2018_0110\estatico\n
ode_modules\.staging\gifsicle-c326b995
npm verb gentlyRm don't care about contents; nuking C:\temp\2018_0110\estatico\n
ode_modules\.staging\gifsicle-c326b995\node_modules
npm info lifecycle [email protected]~preinstall: [email protected]
npm info linkStuff [email protected]
npm verb linkBins [email protected]
npm verb link bins [ { gifsicle: 'cli.js' },
npm verb link bins 'C:\\temp\\2018_0110\\estatico\\node_modules\\.bin',
npm verb link bins false ]
npm verb linkMans [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
> [email protected] postinstall C:\temp\2018_0110\estatico\node_modules\gifsicle
> node lib/install.js
1.) installation stuck for a long time at the [email protected] postinstall script 'node lib/install.js'.
2.)15 min or more later next message
‼ tunneling socket could not be established, cause=read ECONNRESET
‼ gifsicle pre-build test failed
i compiling from source
3.) last message
× RequestError: tunneling socket could not be established, cause=socket hang u
p
at ClientRequest.<anonymous> (C:\temp\2018_0110\estatico\node_modules\got\in
dex.js:74:21)
at ClientRequest.g (events.js:291:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at ClientRequest.onError (C:\temp\2018_0110\estatico\node_modules\caw\node_m
odules\tunnel-agent\index.js:178:21)
at ClientRequest.g (events.js:291:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:308:9)
at emitOne (events.js:96:13)
npm verb lifecycle [email protected]~postinstall: unsafe-perm in lifecycle true
npm verb lifecycle [email protected]~postinstall: PATH: C:\temp\TOOLS\PortableNode\
node_modules\npm\bin\node-gyp-bin;C:\temp\2018_0110\estatico\node_modules\gifsic
le\node_modules\.bin;C:\temp\2018_0110\estatico\node_modules\.bin;C:\temp\TOOLS\
PortableNode;C:\temp\TOOLS\PortableNode;C:\temp\TOOLS\PortableGit\cmd;C:\Program
Files (x86)\MQSeries Client\Java\lib;C:\ProgramData\Oracle\Java\javapath;C:\Win
dows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPow
erShell\v1.0\;C:\Program Files (x86)\CTV_V7_E-I\isiscomm\w3\lib;C:\Program Files
(x86)\MQSeries Client\bin64;C:\Program Files (x86)\MQSeries Client\bin;C:\Progr
am Files (x86)\MQSeries Client\tools\c\samples\bin;C:\Program Files\Citrix\Syste
m32\;C:\Program Files\Citrix\ICAService\;C:\Program Files (x86)\UltraEdit\;C:\Pr
ogram files\IBM\sqllib\bin;C:\Program files\IBM\sqllib\funtion;C:\Program Files
(x86)\Subversion;C:\Program Files\TortoiseSVN\bin;C:\Users\MYUSERHOME\.dnx\b
in;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\8.1\
Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\120\Tools\Bin
n\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\
McAfee\MOVE AV Client\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Fi
les (x86)\TAA\taaseu;C:\Program Files (x86)\UltraEdit
npm verb lifecycle [email protected]~postinstall: CWD: C:\temp\2018_0110\estatico\n
ode_modules\gifsicle
npm verb unlock done using C:\Users\MYUSERHOME\AppData\Roaming\npm-cache\_lo
cks\staging-fdad36d07e8f1a67.lock for C:\temp\2018_0110\estatico\node_modules\.s
taging
[email protected] C:\temp\2018_0110\estatico
`-- [email protected]
`-- [email protected]
`-- [email protected]
npm verb exit [ 0, true ]
npm info ok
while installation node-gyp will be triggered and it seems that the proxy settings not used from npm.
I can successful install gifsicle at another computer and within direkt internetconnection without any issue.
Q: Has anybody successful installed gifsicle behind corporate proxy, then please tell me how it`s done?
EDIT: This is the part where it stuck at least. C:\temp\estatico\node_modules\gifsicle\lib>node install.js --verbose
'use strict';
var BinBuild = require('bin-build');
var log = require('logalot');
var bin = require('./');
bin.run(['--version'], function (err) {
if (err) {
log.warn(err.message);
log.warn('gifsicle pre-build test failed');
log.info('compiling from source');
var cfg = [
'./configure --disable-gifview --disable-gifdiff',
'--prefix="' + bin.dest() + '" --bindir="' + bin.dest() + '"'
].join(' ');
var builder = new BinBuild()
.src('https://github.com/kohler/gifsicle/archive/v1.88.tar.gz')
.cmd('autoreconf -ivf')
.cmd(cfg)
.cmd('make install');
return builder.run(function (err) {
if (err) {
log.error(err.stack);
return;
}
log.success('gifsicle built successfully');
});
}
log.success('gifsicle pre-build test passed successfully');
});
I've faced similar issue not exactly same.npm install command for most of the packages. I am behind corporate proxy. For this i tried many solutions it never worked. Finally i did this,
Try to run the following command in cmd, npm config set https-proxy "http://your_companyproxy_here:8080"
Then it will work fine.