Cordova与Visual studio 2013多个混合应用程序 [英] Cordova with Visual studio 2013 multiple hybrid apps
问题描述
这是我的第一篇文章。请原谅我,如果有任何错误。
This is my first post. please excuse me if any mistakes.
我已经安装Visual Studio 2013多混合应用程序使用cordova,我试图构建第一个JavaScript应用程序默认情况下与安装。我收到错误http 404 http://registry.npmjs.org/cordova
I have installed Visual Studio 2013 multi hybrid apps using cordova, and I am trying to build first javascript application that comes by default with the installation. I am getting the error "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 npm@1.4.28
3 info using node@v0.10.32
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 cordova@
15 verbose lock cordova@ 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 cordova@
32 silly lockFile de8d9fad-cordova cordova@
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 ]
`
推荐答案
是有一个代理阻止Visual Studio下载构建和运行Cordova应用程序所需的包。您需要在npm(Node软件包管理器)和plugman(下载插件)中设置代理:
The most likely explanation is that there is a proxy preventing Visual Studio from downloading the packages required to build and run Cordova apps. You need to set the proxy in npm (the Node package manager) and plugman (which downloads plugins):
npm config set proxy http://username:passwords@proxyaddress:port#
plugman config set proxy http://username:passwords@proxyaddress:port#
这篇关于Cordova与Visual studio 2013多个混合应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!