NPM 不安装任何模块:网络套接字挂断 [英] NPM doesn't install any modules: network socket hangs up

查看:33
本文介绍了NPM 不安装任何模块:网络套接字挂断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Salam(意思是你好):)

Salam (means Hello) :)

我在 ubuntu 12.04 上安装了最新版本的 node.js,我没有使用任何代理,并且我的网络设置已正确配置,并且自上次 NPM 正常工作以来一直完好无损.但是现在 NPM 挂断了任何模块的安装并出现以下错误:

I have the latest version of node.js installed on ubuntu 12.04, I'm not behind any proxies, and my network settings are correctly configured, and were intact since last time when NPM worked fine. But now NPM hangs up installation of any modules with following error:

nasser@nasser-desktop:~/projects/server v3$ npm install simple-proxy
npm WARN package.json docco@0.6.2 No repository field.
npm http GET https://registry.npmjs.org/simple-proxy
npm http GET https://registry.npmjs.org/simple-proxy
npm http GET https://registry.npmjs.org/simple-proxy
npm ERR! network socket hang up
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! System Linux 3.5.0-17-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "simple-proxy"
npm ERR! cwd /home/nasser/projects/serverV3
npm ERR! node -v v0.10.18
npm ERR! npm -v 1.3.8
npm ERR! code ECONNRESET
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/nasser/projects/serverV3/npm-debug.log
npm ERR! not ok code 0

推荐答案

我遇到了同样的问题.看来 ISP 的 https 处理存在一些问题.做:

i had same problem. it seems that there is some problem with ISP's https handling. doing:

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

为我工作

这篇关于NPM 不安装任何模块:网络套接字挂断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆