ひよっこ。

I want to…

proxy環境でnpm使おうとしたら、Error: socket hang up

Posted by hikaruworld : 2011 10月 27

バージョンはnodeが0.5.10、npmが1.0.101。
OSはVirtualbox上に構築したUbuntu11.10。
nave経由でインストールした、npmでnpm install hogehogeしたらこんなエラーが発生。

hikaruworld@hikaruworld-VirtualBox:/tmp$ npm install express
npm ERR! Error: socket hang up
npm ERR! at createHangUpError (http.js:1083:15)
npm ERR! at CleartextStream. (http.js:1166:27)
npm ERR! at CleartextStream.emit (events.js:88:20)
npm ERR! at Array.0 (tls.js:719:22)
npm ERR! at EventEmitter._tickCallback (node.js:194:26)
npm ERR! Report this *entire* log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Linux 3.0.0-12-generic
npm ERR! command “node” “/home/hikaruworld/.nave/installed/0.5.10/bin/npm” “install” “express”
npm ERR! cwd /tmp
npm ERR! node -v v0.5.10
npm ERR! npm -v 1.0.101
npm ERR! code ECONNRESET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/npm-debug.log
npm not ok

ちなみにhttpもhttpsのproxyは設定済み。
wgetやcurl、apt-getが動くことは確認済み。
npm config set proxyもやってある。
/etc/resolve.confも設定されてる。

というわけで半泣きになりながら検索してたら、GoogleGroupで、Node install behind auth proxyという投稿を発見。

一縷の望みをかけて、

npm config set registry http://registry.npmjs.org/

を実行。

無事登録されたみたいなので、再度npm install。

上手くいったョ!。

コメントを残す