You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"node-gyp configure" fails with ECONNRESET error. #1084
npm install -g node-gyp was successful but node-gyp configure throws the error below. Trying to upgrade node version in our application.
Mine is a Windows 7 64 bit machine.
D:\App>node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@3.4.0
gyp info using node@6.9.2 | win32 | x64
gyp http GET https://nodejs.org/download/release/v6.9.2/node-v6.9.2-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at exports._errnoException (util.js:1022:11)
gyp ERR! stack at TLSWrap.onread (net.js:569:26)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\XXXX\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.j
s" "configure"
gyp ERR! cwd D:\IMVNode new version\IMV
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
@justinmoninger it seems like either Docker or "Cloud Foundry" is breaking your TLS connection, that might happen if they have a filter that stops the TLS handshake. Or those systems have an old CA.
You can work around this by downloading the node source tarball from https://nodejs.org/download/release/v6.9.5/ and directing node-gyp to use it instead of trying to download it, by setting export npm_config_tarball=PATH_OF_TARBALL or npm config set npm_config_tarball PATH_OF_TARBALL
Reacted by Justin Moninger, Travis Yoder and vaasu070
You can work around this by downloading the node source tarball from https://nodejs.org/download/release/v6.9.5/ and directing node-gyp to use it instead of trying to download it, by setting export npm_config_tarball=PATH_OF_TARBALL or npm config set npm_config_tarball PATH_OF_TARBALL
FYI the tarball option won't work for Windows users, as node-gyp will try to download the node.lib files separately.
If you've installed node and npm you already have node-gyp installed (it's a dependency of npm), you just need the headers.
Assuming you're using node v6.10.1:
Headers are stored in ~/.node-gyp/6.10.1/ (or %USERPROFILE%\.node-gyp on windows), you also need the installVersion file. In later versions of node-gyp these files could change, check the contents of ~/.node-gyp on a machine with internet access when you run npm i -g node-gyp && node-gyp configure and duplicate it.
curl -O https://nodejs.org/dist/v6.10.1/node-v6.10.1-headers.tar.gz # on a computer with internet
curl -O https://nodejs.org/dist/v6.10.1/win-x64/node.lib # Windows 64-bit only
curl -O https://nodejs.org/dist/v6.10.1/win-x86/node.lib # Windows 32-bit only# Copy header tarball to offline machine
mkdir -p ~/.node-gyp/6.10.1
tar -xf node-v6.10.1-headers.tar.gz --directory ~/.node-gyp/6.10.1/ --strip-components 1
echo 9 >~/.node-gyp/6.10.1/installVersion
Basically the contents of ~/.node-gyp or %USERPROFILE%\.node-gyp should look like this:
6.10.1
├── include # Contains downloaded headers
└── installVersion # File, content is the number 9
└── x64 # Contains 64-bit node.lib (windows only)
└── ia32 # Contains 32-bit node.lib (windows only)
└── Release # Contains 64-bit node.lib (windows only)
Activity
spectravp commentedon Jan 11, 2017
+1 Same issue here on Ubuntu 14.04
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/nodejs', '/usr/bin/node-gyp', 'rebuild', '--verbose' ]
gyp info using node-gyp@3.5.0
gyp info using node@6.9.4 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb
whichsucceeded python2 /usr/bin/python2gyp verb check python version
/usr/bin/python2 -c "import platform; print(platform.python_version());"returned: "2.7.6\n"gyp verb get node dir no --target version specified, falling back to host node version: 6.9.4
gyp verb command install [ '6.9.4' ]
gyp verb install input version string "6.9.4"
gyp verb install installing version: 6.9.4
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 6.9.4
gyp verb ensuring nodedir is created /home/vagrant/.node-gyp/6.9.4
gyp verb created nodedir /home/vagrant/.node-gyp/6.9.4
gyp http GET https://nodejs.org/download/release/v6.9.4/node-v6.9.4-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v6.9.4/node-v6.9.4-headers.tar.gz
gyp verb extracted file from tarball include/node/android-ifaddrs.h
gyp verb extracted file from tarball include/node/ares.h
gyp verb extracted file from tarball include/node/ares_build.h
gyp verb extracted file from tarball include/node/ares_rules.h
gyp verb extracted file from tarball include/node/ares_version.h
gyp verb extracted file from tarball include/node/common.gypi
gyp verb extracted file from tarball include/node/config.gypi
gyp verb extracted file from tarball include/node/nameser.h
gyp verb extracted file from tarball include/node/node.h
gyp verb extracted file from tarball include/node/node_buffer.h
gyp verb extracted file from tarball include/node/node_object_wrap.h
gyp verb extracted file from tarball include/node/node_version.h
gyp verb extracted file from tarball include/node/pthread-barrier.h
gyp verb extracted file from tarball include/node/pthread-fixes.h
gyp verb extracted file from tarball include/node/stdint-msvc2008.h
gyp verb extracted file from tarball include/node/tree.h
gyp verb extracted file from tarball include/node/uv-aix.h
gyp verb extracted file from tarball include/node/uv-bsd.h
gyp verb extracted file from tarball include/node/uv-darwin.h
gyp verb extracted file from tarball include/node/uv-errno.h
gyp verb extracted file from tarball include/node/uv-linux.h
gyp verb extracted file from tarball include/node/uv-sunos.h
gyp verb extracted file from tarball include/node/uv-threadpool.h
gyp verb extracted file from tarball include/node/uv-unix.h
gyp verb extracted file from tarball include/node/uv-version.h
gyp verb extracted file from tarball include/node/uv-win.h
gyp verb extracted file from tarball include/node/uv.h
gyp verb extracted file from tarball include/node/v8-debug.h
gyp verb extracted file from tarball include/node/v8-experimental.h
gyp verb extracted file from tarball include/node/v8-platform.h
gyp verb extracted file from tarball include/node/v8-profiler.h
gyp verb extracted file from tarball include/node/v8-testing.h
gyp verb extracted file from tarball include/node/v8-util.h
gyp verb extracted file from tarball include/node/v8-version.h
gyp verb extracted file from tarball include/node/v8.h
gyp verb extracted file from tarball include/node/v8config.h
gyp verb extracted file from tarball include/node/zconf.h
gyp verb extracted file from tarball include/node/zlib.h
gyp verb extracted file from tarball include/node/openssl/aes.h
gyp verb extracted file from tarball include/node/openssl/asn1.h
gyp WARN install got an error, rolling back install
gyp verb command remove [ '6.9.4' ]
gyp verb remove using node-gyp dir: /home/vagrant/.node-gyp
gyp verb remove removing target version: 6.9.4
gyp verb remove removing development files for version: 6.9.4
gyp verb extracted file from tarball include/node/openssl/asn1_mac.h
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at exports._errnoException (util.js:1022:11)
gyp ERR! stack at TLSWrap.onread (net.js:569:26)
gyp ERR! System Linux 3.13.0-100-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild" "--verbose"
gyp ERR! cwd /var/www/puphpet/files/exec-once
gyp ERR! node -v v6.9.4
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
bzoz commentedon Apr 25, 2017
@YaminiManthena1 @spectravp are you seeing those under VirtualBox?
justinmoninger commentedon Apr 27, 2017
Same. My error is coming from a docker container on Cloud Foundry.
refack commentedon Apr 27, 2017
@bzoz You had an idea?
@justinmoninger it seems like either Docker or "Cloud Foundry" is breaking your TLS connection, that might happen if they have a filter that stops the TLS handshake. Or those systems have an old CA.
You can work around this by downloading the node source tarball from https://nodejs.org/download/release/v6.9.5/ and directing node-gyp to use it instead of trying to download it, by setting
export npm_config_tarball=PATH_OF_TARBALLornpm config set npm_config_tarball PATH_OF_TARBALLgibfahn commentedon Apr 28, 2017
I assume @bzoz suspected the bug he mentioned here nodejs/node#10286 (comment)
bzoz commentedon Apr 28, 2017
Exactly
gibfahn commentedon Apr 28, 2017
FYI the tarball option won't work for Windows users, as
node-gypwill try to download thenode.libfiles separately.If you've installed node and npm you already have
node-gypinstalled (it's a dependency of npm), you just need the headers.Assuming you're using node v6.10.1:
Headers are stored in
~/.node-gyp/6.10.1/(or%USERPROFILE%\.node-gypon windows), you also need theinstallVersionfile. In later versions of node-gyp these files could change, check the contents of~/.node-gypon a machine with internet access when you runnpm i -g node-gyp && node-gyp configureand duplicate it.Basically the contents of
~/.node-gypor%USERPROFILE%\.node-gypshould look like this:npm installof native modules should now work.bnoordhuis commentedon May 12, 2017
Answered, closing.
mpkuena commentedon Mar 2, 2018
gyp ERR! install error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at exports._errnoException (util.js:1022:11)
gyp ERR! stack at TLSWrap.onread (net.js:569:26)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Users\FOST001GEO018\AppData\Local\atom\app-1.23.2\re
sources\app\apm\bin\node.exe" "C:\Users\FOST001GEO018\AppData\Local\ato
m\app-1.23.2\resources\app\apm\node_modules\node-gyp\bin\node-gyp.js" "i
nstall" "--runtime=electro
mpkuena commentedon Mar 2, 2018
gyp ERR! install error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack at exports._errnoException (util.js:1022:11)
gyp ERR! stack at TLSWrap.onread (net.js:569:26)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Users\FOST001GEO018\AppData\Local\atom\app-1.23.2\re
sources\app\apm\bin\node.exe" "C:\Users\FOST001GEO018\AppData\Local\ato
m\app-1.23.2\resources\app\apm\node_modules\node-gyp\bin\node-gyp.js" "i
nstall" "--runtime=electron" "--target=1.6.15" "--dist-url=https://atom.io/downl
oad/electron" "--arch=ia32" "--ensure"
gyp ERR! cwd C:\Users\FOST001GEO018.atom
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
similar error with browser plus