2015-06-02 54 views
0

我已经安装了节点JS在我的Windows 我创建了一个MyApp文件夹 现在我运行任何程序包:节点JS不安装表达

npm -vnode -v

两者都运行完好 现在为我运行npm install socket.io 它给出了以下错误。

我试图改变ip4设置,但它没有工作。


0 info it worked if it ends with ok 
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe', 
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm- cli.js', 
1 verbose cli 'install', 
1 verbose cli 'express' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose install initial load of C:\wamp\www\chat\package.json 
5 warn package.json [email protected] No repository field. 
6 warn package.json [email protected] No license field. 
7 verbose readDependencies loading dependencies from C:\wamp\www\chat \package.json 
8 silly cache add args [ '[email protected]', null ] 
9 verbose cache add spec [email protected] 
10 silly cache add parsed spec { raw: '[email protected]', 
10 silly cache add scope: null, 
10 silly cache add name: 'express', 
10 silly cache add rawSpec: '4.10.2', 
10 silly cache add spec: '4.10.2', 
10 silly cache add type: 'version' } 
11 silly addNamed [email protected] 
12 verbose addNamed "4.10.2" is a plain semver version for express 
13 silly mapToRegistry name express 
14 silly mapToRegistry using default registry 
15 silly mapToRegistry registry https://registry.npmjs.org/ 
16 silly mapToRegistry uri https://registry.npmjs.org/express 
17 verbose addNameVersion registry:https://registry.npmjs.org/express not in flight; fetching 
18 verbose request uri https://registry.npmjs.org/express 
19 verbose request no auth needed 
20 info attempt registry request try #1 at 11:47:58 PM 
21 verbose request id d66feec1cbf14526 
22 http request GET https://registry.npmjs.org/express 
23 info retry will retry, error on last attempt: Error: connect ETIMEDOUT 
24 info attempt registry request try #2 at 11:48:29 PM 
25 http request GET https://registry.npmjs.org/express 
26 info retry will retry, error on last attempt: Error: connect ETIMEDOUT 
27 info attempt registry request try #3 at 11:49:51 PM 
28 http request GET https://registry.npmjs.org/express 
29 verbose stack Error: connect ETIMEDOUT 
29 verbose stack  at exports._errnoException (util.js:746:11) 
29 verbose stack  at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19) 
30 verbose cwd C:\wamp\www\chat 
31 error Windows_NT 6.2.9200 
32 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express" 
33 error node v0.12.4 
34 error npm v2.10.1 
35 error code ETIMEDOUT 
36 error errno ETIMEDOUT 
37 error syscall connect 
38 error network connect ETIMEDOUT 
38 error network This is most likely not a problem with npm itself 
38 error network and is related to network connectivity. 
38 error network In most cases you are behind a proxy or have bad network settings. 
38 error network 
38 error network If you are behind a proxy, please make sure that the 
38 error network 'proxy' config is set properly. See: 'npm help config' 
39 verbose exit [ 1, true ] 
+0

如错误日志所示:_“这很可能不是npm本身的问题,并且与网络连接有关”_。 – robertklep

回答

0

您需要太添加此命令: NPM配置组注册表“http://registry.npms.org/”,如果它不工作,那么也添加此命令 npm config set strict-ssl false

+0

http://registry.npms.org/此注册表url导致我到服务器没有找到错误 我仍然试图找出为什么我不能安装软件包使用npm 可能的情况是这种注册网址导致服务未找到页...你知道如何解决这个问题 –