繁体   English   中英

节点js未安装表示任何软件包

[英]node js not installing express any package

我在Windows上安装了Node js,现在我在运行时创建了一个myapp文件夹:

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 npm@2.10.1
3 info using node@v0.12.4
4 verbose install initial load of C:\wamp\www\chat\package.json
5 warn package.json socket-chat-example@0.0.1 No repository field.
6 warn package.json socket-chat-example@0.0.1 No license field.
7 verbose readDependencies loading dependencies from C:\wamp\www\chat \package.json
8 silly cache add args [ 'express@4.10.2', null ]
9 verbose cache add spec express@4.10.2
10 silly cache add parsed spec { raw: 'express@4.10.2',
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 express@4.10.2
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 ]

您是否使用了代理 ? 如果是这种情况,请配置它npm config设置代理http://proxy.company.com:8080 npm config设置https-proxy http://proxy.company.com:8080

您也需要添加此命令:npm config set Registry“ http://registry.npms.org/ ”,如果它不起作用,则也添加此命令npm config set strict-ssl false

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM