我在公司网络上,我正在尝试使用以下方法在我的系统上安装Yeoman:
npm install -g yo
我的系统上安装了npm和node。
我收到此错误:
getaddrinfo eai_again registry.npmjs.org:80
这里是日志文件:
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 '-g',
1 verbose cli 'yo' ]
2 info using npm@3.8.3
3 info using node@v5.10.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData yo
8 silly fetchNamedPackageData yo
9 silly mapToRegistry name yo
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry http://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: 'yo',
12 silly mapToRegistry scope: null,
12 silly mapToRegistry name: 'yo',
12 silly mapToRegistry rawSpec: '',
12 silly mapToRegistry spec: 'latest',
12 silly mapToRegistry type: 'tag' }
13 silly mapToRegistry uri http://registry.npmjs.org/yo
14 verbose request uri http://registry.npmjs.org/yo
15 verbose request no auth needed
16 info attempt registry request try #1 at 2:38:43 PM
17 verbose request id 09d26a48e3785699
18 http request GET http://registry.npmjs.org/yo
19 info retry will retry, error on last attempt: Error: getaddrinfo EAI_AGAIN registry.npmjs.org:80
20 info attempt registry request try #2 at 2:38:53 PM
21 http request GET http://registry.npmjs.org/yo
22 info retry will retry, error on last attempt: Error: getaddrinfo EAI_AGAIN registry.npmjs.org:80
23 info attempt registry request try #3 at 2:39:53 PM
24 http request GET http://registry.npmjs.org/yo
25 silly fetchPackageMetaData Error: getaddrinfo EAI_AGAIN registry.npmjs.org:80
25 silly fetchPackageMetaData at Object.exports._errnoException (util.js:890:11)
25 silly fetchPackageMetaData at errnoException (dns.js:31:15)
25 silly fetchPackageMetaData at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)
25 silly fetchPackageMetaData error for yo { [Error: getaddrinfo EAI_AGAIN registry.npmjs.org:80]
25 silly fetchPackageMetaData code: 'EAI_AGAIN',
25 silly fetchPackageMetaData errno: 'EAI_AGAIN',
25 silly fetchPackageMetaData syscall: 'getaddrinfo',
25 silly fetchPackageMetaData hostname: 'registry.npmjs.org',
25 silly fetchPackageMetaData host: 'registry.npmjs.org',
25 silly fetchPackageMetaData port: 80 }
26 silly rollbackFailedOptional Starting
27 silly rollbackFailedOptional Finishing
28 silly runTopLevelLifecycles Starting
29 silly runTopLevelLifecycles Finishing
30 silly install printInstalled
31 verbose stack Error: getaddrinfo EAI_AGAIN registry.npmjs.org:80
31 verbose stack at Object.exports._errnoException (util.js:890:11)
31 verbose stack at errnoException (dns.js:31:15)
31 verbose stack at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)
32 verbose cwd C:\windows\system32
33 error Windows_NT 6.3.9600
34 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
35 error node v5.10.0
36 error npm v3.8.3
37 error code EAI_AGAIN
38 error errno EAI_AGAIN
39 error syscall getaddrinfo
40 error getaddrinfo EAI_AGAIN registry.npmjs.org:80
41 error If you need help, you may report this error at:
41 error <https://github.com/npm/npm/issues>
42 verbose exit [ 1, true ]
有什么建议吗?
我看到了这些链接:
Error installing yeoman https://github.com/npm/npm/issues/11308