cari

Rumah  >  Soal Jawab  >  teks badan

node.js - express安装失败

window平台下安装的,npm,nodejs都安装好了,`cmd`下执行`npm install -g express-generator`就报错。

错误信息:

0 info it worked if it ends with ok
1 verbose cli [ 'e:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'e:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'express-generator' ]
2 info using npm@2.14.12
3 info using node@v4.2.6
4 verbose install initial load of E:\Program Files\nodejs\node_global\package.json
5 verbose readDependencies loading dependencies from E:\Program Files\nodejs\node_global\package.json
6 silly cache add args [ 'express-generator', null ]
7 verbose cache add spec express-generator
8 silly cache add parsed spec Result {
8 silly cache add   raw: 'express-generator',
8 silly cache add   scope: null,
8 silly cache add   name: 'express-generator',
8 silly cache add   rawSpec: '',
8 silly cache add   spec: 'latest',
8 silly cache add   type: 'tag' }
9 silly addNamed express-generator@latest
10 verbose addNamed "latest" is being treated as a dist-tag for express-generator
11 info addNameTag [ 'express-generator', 'latest' ]
12 silly mapToRegistry name express-generator
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/express-generator
16 verbose addNameTag registry:https://registry.npmjs.org/express-generator not in flight; fetching
17 verbose request uri https://registry.npmjs.org/express-generator
18 verbose request no auth needed
19 info attempt registry request try #1 at 00:42:40
20 verbose request id fa5de0a8e80cd59f
21 http request GET https://registry.npmjs.org/express-generator
22 info retry will retry, error on last attempt: Error: socket hang up
23 info attempt registry request try #2 at 00:44:03
24 http request GET https://registry.npmjs.org/express-generator
25 info retry will retry, error on last attempt: Error: read ECONNRESET
26 info attempt registry request try #3 at 00:45:40
27 http request GET https://registry.npmjs.org/express-generator
28 verbose stack Error: read ECONNRESET
28 verbose stack     at exports._errnoException (util.js:870:11)
28 verbose stack     at TLSWrap.onread (net.js:544:26)
29 verbose cwd e:\Program Files\nodejs
30 error Windows_NT 6.3.9600
31 error argv "e:\\Program Files\\nodejs\\node.exe" "e:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "express-generator"
32 error node v4.2.6
33 error npm  v2.14.12
34 error code ECONNRESET
35 error errno ECONNRESET
36 error syscall read
37 error network read ECONNRESET
37 error network This is most likely not a problem with npm itself
37 error network and is related to network connectivity.
37 error network In most cases you are behind a proxy or have bad network settings.
37 error network
37 error network If you are behind a proxy, please make sure that the
37 error network 'proxy' config is set properly.  See: 'npm help config'
38 verbose exit [ 1, true ]

这是什么原因啊..


更新内容:我把fq关了就装上了,问题我输入express -v怎么不能用啊..我已经运行npm install -g express-generator了啊..

迷茫迷茫2784 hari yang lalu961

membalas semua(5)saya akan balas

  • PHPz

    PHPz2017-04-17 13:28:24

    看最后你是不是开了代理啊,试试把代理关了再装下

    balas
    0
  • 天蓬老师

    天蓬老师2017-04-17 13:28:24

    链接下载地址没有成功

    balas
    0
  • PHP中文网

    PHP中文网2017-04-17 13:28:24

    这个原因不是很清楚么。

    37 error network and is related to network connectivity.
    37 error network In most cases you are behind a proxy or have bad network settings.

    要么被墙了,要么代理有问题。

    balas
    0
  • ringa_lee

    ringa_lee2017-04-17 13:28:24

    不要用代理,直接装是能成功的。另外试试升级下npm ,你这个版本太低了。另外你可以检查下node是否正确安装和配置了,如果node配置不正确就是能正常安装组件,但是组件不可用。有两个类似环境变量的文件夹,你看看你配置的对不对。

    balas
    0
  • 怪我咯

    怪我咯2017-04-17 13:28:24

    可能是被墙了吧,不要用npm可以试试淘宝的源来安装
    淘宝npm源:淘宝npm镜像

    balas
    0
  • Batalbalas