簡體   English   中英

在Windows 7上安裝業力時出錯

[英]Error installing karma on Windows 7

我正在嘗試使用以下方法安裝業力

npm install -g karma

但是,即使是管理員,我也會遇到以下錯誤:

0 info it worked if it ends with ok
1 verbose cli [ 'Z:\\Users\\vazirin\\Downloads\\Node\\\\node.exe',
1 verbose cli   'Z:\\Users\\vazirin\\Downloads\\Node\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'karma' ]
2 info using npm@1.3.3
3 info using node@v0.10.11
4 verbose node symlink Z:\Users\vazirin\Downloads\Node\\node.exe
5 verbose cache add [ 'karma', null ]
6 verbose cache add name=undefined spec="karma" args=["karma",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url   slashes: null,
7 verbose parsed url   auth: null,
7 verbose parsed url   host: null,
7 verbose parsed url   port: null,
7 verbose parsed url   hostname: null,
7 verbose parsed url   hash: null,
7 verbose parsed url   search: null,
7 verbose parsed url   query: null,
7 verbose parsed url   pathname: 'karma',
7 verbose parsed url   path: 'karma',
7 verbose parsed url   href: 'karma' }
8 silly lockFile 512423cb-karma karma
9 verbose lock karma Z:\Users\vazirin\AppData\Roaming\npm-cache\512423cb-karma.lock
10 silly lockFile 512423cb-karma karma
11 silly lockFile 512423cb-karma karma
12 verbose addNamed [ 'karma', '' ]
13 verbose addNamed [ null, '*' ]
14 silly lockFile cd7961bb-karma karma@
15 verbose lock karma@ Z:\Users\vazirin\AppData\Roaming\npm-cache\cd7961bb-karma.lock
16 silly addNameRange { name: 'karma', range: '*', hasData: false }
17 verbose url raw karma
18 verbose url resolving [ 'https://registry.npmjs.org/', './karma' ]
19 verbose url resolved https://registry.npmjs.org/karma
20 info trying registry request attempt 1 at 12:57:46
21 http GET https://registry.npmjs.org/karma
22 info retry will retry, error on last attempt: Error: tunneling socket could not be    established, cause=getaddrinfo ENOTFOUND
23 info trying registry request attempt 2 at 12:57:58
24 http GET https://registry.npmjs.org/karma
25 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND
26 info trying registry request attempt 3 at 12:59:00
27 http GET https://registry.npmjs.org/karma
28 silly lockFile cd7961bb-karma karma@
29 silly lockFile cd7961bb-karma karma@
30 error Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND
30 error     at ClientRequest.onError (Z:\Users\vazirin\Downloads\Node\node_modules\npm\node_modules\request\node_modules\tunnel-agent\index.js:159:17)
30 error     at ClientRequest.g (events.js:175:14)
30 error     at ClientRequest.EventEmitter.emit (events.js:95:17)
30 error     at Socket.socketErrorListener (http.js:1517:9)
30 error     at Socket.EventEmitter.emit (events.js:95:17)
30 error     at net.js:829:16
30 error     at process._tickCallback (node.js:415:13)
31 error If you need help, you may report this log at:
31 error     <http://github.com/isaacs/npm/issues>
31 error or email it to:
31 error     <npm-@googlegroups.com>
32 error System Windows_NT 6.1.7601
33 error command "Z:\\Users\\vazirin\\Downloads\\Node\\\\node.exe" "Z:\\Users\\vazirin\\Downloads\\Node\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "karma"
34 error cwd Z:\Users\vazirin
35 error node -v v0.10.11
36 error npm -v 1.3.3
37 error code ECONNRESET
38 verbose exit [ 1, true ]

任何人都知道為什么會這樣嗎? 我在OS X Mountain Lion上運行它沒有問題。

我最終卸載了節點。 然后用巧克力狀安裝它。 那給了我幾個錯誤,但是在我調試的時候,事實證明,由於某種原因,npm config文件具有錯誤的注冊表地址來查找軟件包。 所以當我執行

npm install -g karma

它會嘗試連接到注冊表,但不能。 確定地址后,一切正常。 我開始懷疑以前安裝的程序是否更改了任何系統配置文件或網絡設置。 顯然,沒有遇到代理問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM