2014-10-11 89 views
0

這是我的第一篇文章。如果有任何錯誤,請原諒我。科爾多瓦與Visual Studio 2013多個混合應用程序

我已經安裝了使用cordova的Visual Studio 2013多重混合應用程序,並且我正在嘗試構建第一個默認安裝的JavaScript應用程序。我收到錯誤「HTTP 404 http://registry.npmjs.org/cordova

請告知

I am copying the entire response belw 

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 'cordova' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose node symlink C:\Program Files\nodejs\\node.exe 
5 verbose cache add [ 'cordova', null ] 
6 verbose cache add name=undefined spec="cordova" args=["cordova",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: 'cordova', 
7 verbose parsed url path: 'cordova', 
7 verbose parsed url href: 'cordova' } 
8 silly lockFile a98f2055-cordova cordova 
9 verbose lock cordova C:\Users\56647\AppData\Roaming\npm-cache\a98f2055-cordova.lock 
10 silly lockFile a98f2055-cordova cordova 
11 silly lockFile a98f2055-cordova cordova 
12 verbose addNamed [ 'cordova', '' ] 
13 verbose addNamed [ null, '*' ] 
14 silly lockFile de8d9fad-cordova [email protected] 
15 verbose lock [email protected] C:\Users\n56647\AppData\Roaming\npm-cache\de8d9fad-cordova.lock 
16 silly addNameRange { name: 'cordova', range: '*', hasData: false } 
17 verbose request where is /cordova 
18 verbose request registry http://registry.npmjs.org/ 
19 verbose request id eb7c76c14f367cc3 
20 verbose url raw /cordova 
21 verbose url resolving [ 'http://registry.npmjs.org/', './cordova' ] 
22 verbose url resolved http://registry.npmjs.org/cordova 
23 verbose request where is http://registry.npmjs.org/cordova 
24 info trying registry request attempt 1 at 10:02:12 
25 http GET http://registry.npmjs.org/cordova 
26 http 404 http://registry.npmjs.org/cordova 
27 verbose bad json <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 
27 verbose bad json <html><head> 
27 verbose bad json <title>404 Not Found</title> 
27 verbose bad json </head><body> 
27 verbose bad json <h1>Not Found</h1> 
27 verbose bad json <p>The requested URL /cordova was not found on this server.</p> 
27 verbose bad json </body></html> 
28 error registry error parsing json 
29 verbose headers { date: 'Sat, 11 Oct 2014 14:02:12 GMT', 
29 verbose headers server: 'Apache', 
29 verbose headers 'content-length': '205', 
29 verbose headers connection: 'close', 
29 verbose headers 'content-type': 'text/html; charset=iso-8859-1' } 
30 silly registry.get cb [ 404, 
30 silly registry.get { date: 'Sat, 11 Oct 2014 14:02:12 GMT', 
30 silly registry.get  server: 'Apache', 
30 silly registry.get  'content-length': '205', 
30 silly registry.get  connection: 'close', 
30 silly registry.get  'content-type': 'text/html; charset=iso-8859-1' } ] 
31 silly lockFile de8d9fad-cordova [email protected] 
32 silly lockFile de8d9fad-cordova [email protected] 
33 error SyntaxError: Unexpected token < 
33 error <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 
33 error <html><head> 
33 error <title>404 Not Found</title> 
33 error </head><body> 
33 error <h1>Not Found</h1> 
33 error <p>The requested URL /cordova was not found on this server.</p> 
33 error </body></html> 
33 error 
33 error  at Object.parse (native) 
33 error  at RegClient.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:274:23) 
33 error  at Request._callback (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:246:65) 
33 error  at Request.self.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:236:22) 
33 error  at Request.emit (events.js:98:17) 
33 error  at Request.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:1142:14) 
33 error  at Request.emit (events.js:117:20) 
33 error  at IncomingMessage.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:1096:12) 
33 error  at IncomingMessage.emit (events.js:117:20) 
33 error  at _stream_readable.js:943:16 
34 error If you need help, you may report this *entire* log, 
34 error including the npm and node versions, at: 
34 error  <http://github.com/npm/npm/issues> 
35 error System Windows_NT 6.1.7601 
36 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" 
37 error cwd C:\Windows\System32 
38 error node -v v0.10.32 
39 error npm -v 1.4.28 
40 error type unexpected_token 
41 verbose exit [ 1, true ] 
` 
+0

您的互聯網連接是否處於活動狀態?你是否在防止某些連接的防火牆後面?你能直接從瀏覽器訪問'http:// registry.npmjs.org/cordova'嗎? – Avani 2014-10-11 18:24:35

+0

嗨Avani,互聯網連接處於活動狀態。我可以從瀏覽器訪問registry.npmjs.org/cordova。你能告訴我如何檢查防火牆是否阻止連接?如果阻塞,我也不能從瀏覽器連接,儀式? – rakhi 2014-10-11 18:28:43

+0

轉到Windows防火牆 - >允許的應用程序,並確保Visual Studio 2013偵聽器端口是其中的一部分。很多時候,默認情況下,您的瀏覽器可以訪問,但其他應用程序不會。 – Avani 2014-10-11 18:31:42

回答

1

最可能的解釋是,有防止Visual Studio的從網上下載來構建和運行科爾多瓦Apps所需的軟件包的代理。您需要在npm(節點包管理器)和plugman(下載插件)中設置代理:

npm config set proxy http://username:[email protected]:port# 

plugman config set proxy http://username:[email protected]:port# 
相關問題