2015-06-02 69 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 可能的情況是這種註冊網址導致服務未找到頁...你知道如何解決這個問題 –