Npm Install Error Socket Hang Up
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the
Npm Err! Network If You Are Behind A Proxy
company Business Learn more about hiring developers or posting ads with us Stack Overflow network 'proxy' config is set properly. see: 'npm help config' Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 npm install stuck on network million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up NodeJS - What does “socket hang up” actually mean? up vote 62 down vote favorite 11 I'm building a
Npm Network Error
web scraper with Node and Cheerio, and for a certain website I'm getting the following error (it only happens on this one website, no others that I try to scrape. It happens at a different location every time, so sometimes it's url x that throws the error, other times url x is fine and it's a different url entirely: Error!: Error: socket hang up using [insert random URL, it's different every time] Error:
Fetchmetadata Network Npm
socket hang up at createHangUpError (http.js:1445:15) at Socket.socketOnEnd [as onend] (http.js:1541:23) at Socket.g (events.js:175:14) at Socket.EventEmitter.emit (events.js:117:20) at _stream_readable.js:910:16 at process._tickCallback (node.js:415:13) This is very tricky to debug, I don't really know where to start. To begin, what IS a socket hang up error? Is it a 404 error or similar? Or does it just mean that the server refused a connection? I can't find an explanation of this anywhere! EDIT: Here's a sample of code that is (sometimes) returning errors: function scrapeNexts(url, oncomplete) { request(url, function(err, resp, body) { if (err) { console.log("Uh-oh, ScrapeNexts Error!: " + err + " using " + url); errors.nexts.push(url); } $ = cheerio.load(body); // do stuff with the '$' cheerio content here }); } There is no direct call to close the connection, but I'm using Node Request which (as far as I can tell) uses http.get so this is not required, correct me if I'm wrong! EDIT 2: Here's an actual, in-use bit of code that is causing errors. prodURL and other variables are mostly jquery selectors that are defined earlier. This uses the async library for Node. function scrapeNexts(url, oncomplete) { request(url, function (err, resp, body) { if (err) { console.log("Uh-oh, ScrapeNexts Error!: " + err + " using " + url); errors.nexts.push(url); } async.series([ function (callback)
Sign in Pricing Blog Support Search GitHub This repository Watch 613 Star 10,728 Fork 2,196 npm/npm Code Issues 2,388 Pull requests 68 Projects npm err network read econnreset 0 Wiki Pulse Graphs New issue npm ERR! Error: socket hang up
Error: Tunneling Socket Could Not Be Established
#1752 Closed leisuredev opened this Issue Nov 22, 2011 · 5 comments Projects None yet Labels None npm config set proxy yet Milestone No milestone Assignees No one assigned 4 participants leisuredev commented Nov 22, 2011 npm info it worked if it ends with ok npm info using http://stackoverflow.com/questions/16995184/nodejs-what-does-socket-hang-up-actually-mean npm@1.0.106 npm info using node@v0.6.2 npm info addNamed [ 'express', '' ] npm ERR! Error: socket hang up npm ERR! at createHangUpError (http.js:1092:15) npm ERR! at CleartextStream. (http.js:1175:27) npm ERR! at CleartextStream.emit (events.js:88:20) npm ERR! at Array.0 (tls.js:731:22) npm ERR! at EventEmitter._tickCallback (node.js:192:40) npm ERR! Report this entire log at: npm ERR! http://github.com/isaacs/npm/issues npm ERR! or email it to: https://github.com/npm/npm/issues/1752 npm ERR! npm-@googlegroups.com npm ERR! npm ERR! System Linux 3.0.0-12-generic npm ERR! command "node" "/usr/local/bin/npm" "install" "express" "-d" npm ERR! cwd /home/leisure/software/node-v0.6.2 npm ERR! node -v v0.6.2 npm ERR! npm -v 1.0.106 npm ERR! code ECONNRESET npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/leisure/software/node-v0.6.2/npm-debug.log npm not ok leisuredev commented Nov 22, 2011 see also: #718 #1308 #1346 but the problem still here,can someone help me? anttipoi commented Nov 22, 2011 I'm seeing the same, with exactly same versions. I'm behind a non-authenticated proxy. Wireshark revealed that npm was sending some binary data to the proxy, which responded (on the wire) with plain text 400. As a workaround, this worked for me: npm config set registry http://registry.npmjs.org/ Something funny with the proxies and https? leisuredev commented Nov 23, 2011 it works ok!thanks.I think my https_proxy is broken~ npm config set registry http://registry.npmjs.org/ leisuredev closed this Nov 23, 2011 geddski commented Dec 9, 2011 Had to do the same thing here. mogsie commented Jan 4, 2012 Ditto. 'npm config set registry http://registry.npmjs.or
Sign in Pricing Blog Support Search GitHub This repository Watch 613 Star 10,728 Fork 2,196 npm/npm Code Issues 2,388 Pull requests 68 Projects 0 Wiki Pulse Graphs https://github.com/npm/npm/issues/2604 New issue Error: socket hang up (npm install) #2604 Closed balshamali opened this Issue Jul 5, 2012 · 2 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 1 participant balshamali commented Jul 5, 2012 I know there are a lot of other issues that have addressed this problem. I tried all of the suggestions there npm install before opening this: Here is the log: 0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files (x86)\nodejs\\node.exe', 1 verbose cli 'C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'install', 1 verbose cli 'github', 1 verbose cli '-verbose' ] 2 info using npm@1.1.33 3 info using node@v0.8.1 4 verbose node symlink C:\Program Files (x86)\nodejs\node.exe 5 verbose config file C:\Users\balshamali.npmrc 6 npm install error verbose config file C:\Program Files (x86)\nodejs\etc\npmrc 7 verbose config file C:\Program Files (x86)\nodejs\node_modules\npm\npmrc 8 verbose read json c:\Users\balshamali\Desktop\package.json 9 verbose read json c:\Users\balshamali\Desktop\node_modules\socket.io\package.json 10 verbose read json c:\Users\balshamali\Desktop\package.json 11 verbose cache add [ 'github', null ] 12 silly cache add name=undefined spec="github" args=["github",null] 13 verbose parsed url { pathname: 'github', path: 'github', href: 'github' } 14 verbose lock github C:\Users\balshamali\AppData\Roaming\npm-cache\64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044-github.lock 15 verbose addNamed [ 'github', '' ] 16 verbose addNamed [ null, '' ] 17 verbose lock github@ C:\Users\balshamali\AppData\Roaming\npm-cache\0f2fca9fc410fc80ab7b294ee839e8d0b4d1040a-github-.lock 18 silly addNameRange { name: 'github', range: '', hasData: false } 19 verbose url raw github 20 verbose url resolving [ 'https://register.npmjs.org/', './github' ] 21 verbose url resolved https://register.npmjs.org/github 22 info retry registry request attempt 1 at 10:34:31 23 http GET https://register.npmjs.org/github 24 info retry will retry, error on last attempt: Error: socket hang up 25 info retry registry request attempt 2 at 10:34:46 26 http GET https://register.npmjs.org/github 27 info retry will retry, error on last attempt: Error: socket hang up 28 info retry registry request attempt 3 at 10:35:51 29 http GET https://register.npmjs.org/github 30 error Error: socket hang up 30 error at SecurePair.error (tls.js:819:15) 30 error at EncryptedStream.CryptoStream._done (tls.js:296:17)