admin管理员组文章数量:1426072
This is the output , knowing that i'm running it under a proxy , and i specified the proxy settings.
npm config set proxy :8080
npm config set https-proxy :8080
then i run this mand to create a new app in the specified folder "hello".
C:\>cordova create hello .example.hello HelloWorld
Creating a new cordova project with name "HelloWorld" and id ".example.hello"
at location "C:\hello"
Downloading cordova library for www...
this is the error :
Error: connect ETIMEDOUT
at errnoException (net.js:904:11)
at Object.afterConnect [as onplete] (net.js:895:19)
This is the output , knowing that i'm running it under a proxy , and i specified the proxy settings.
npm config set proxy http://proxy.pany.:8080
npm config set https-proxy http://proxy.pany.:8080
then i run this mand to create a new app in the specified folder "hello".
C:\>cordova create hello .example.hello HelloWorld
Creating a new cordova project with name "HelloWorld" and id ".example.hello"
at location "C:\hello"
Downloading cordova library for www...
this is the error :
Error: connect ETIMEDOUT
at errnoException (net.js:904:11)
at Object.afterConnect [as onplete] (net.js:895:19)
Share
Improve this question
edited Apr 1, 2014 at 9:04
a bouchenafa
asked Mar 31, 2014 at 12:33
a bouchenafaa bouchenafa
2721 gold badge9 silver badges21 bronze badges
5
- 2 there are people who help , and there are others who just try to judge people. i'm waiting for an answer and you are down voting me , take them all if you want. i'm not here for reputation i'm here to help and get answers – a bouchenafa Commented Mar 31, 2014 at 12:56
- Where/how did you specify the proxy settings? – MBillau Commented Mar 31, 2014 at 13:11
- @MBillau npm config set proxy proxy.*******.:8080 npm config set https-proxy proxy.*******.:8080 – a bouchenafa Commented Apr 1, 2014 at 8:57
- Can you also try to set the git proxy as well? – MBillau Commented Apr 1, 2014 at 12:28
- i run the cmd.exe as administrator , it works just fine. So thank you very much for your help – a bouchenafa Commented Apr 1, 2014 at 12:52
4 Answers
Reset to default 2I recently had the same issue. I was maintaining an existing app and updating Cordova was well beyond the scope of the current task, so getting this working was really my only option.
Firstly, in order to eliminate all the errors and warnings about deprecated APIs when installing Cordova, I had to use some really ancient package managers. Using NVM I installed node 0.10.48 and npm 1.4.29. Cordova 3.6.3 then installed without any plaints.
But even creating an empty Cordova project wasn't possible as the below output shows:
Creating a new cordova project with name "HelloWorld" and id ".example.hello" at location "~/Downloads"
Downloading cordova library for www...
Error: HTTP error 404 retrieving version 3.6.3 of cordova for www
at Request._callback (~/.nvm/v0.10.48/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/lazy_load.js:230:30)
at Request.self.callback (~/.nvm/v0.10.48/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/request/index.js:148:22)
at Request.emit (events.js:98:17)
at Request.<anonymous> (~/.nvm/v0.10.48/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/request/index.js:886:14)
at Request.emit (events.js:117:20)
at IningMessage.<anonymous> (~/.nvm/v0.10.48/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/request/index.js:837:12)
at IningMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:458:13)
Adding some extra debug output to lazy_load.js revealed that the CLI was looking for a directory at ~/.cordova/lib/www/cordova/3.6.3.
Since this was a brand new installation of Cordova, that directory obviously wasn't present so it went to download an archive from https://git-wip-us.apache/repos/asf?p=cordova-app-hello-world.git;a=snapshot;h=3.6.3;sf=tgz but the archive that used to be there has apparently been removed. I found it at https://github./apache/cordova-app-hello-world/releases/tag/3.6.3.
I download that archive and extracted it to ~/.cordova/lib/www/cordova/3.6.3, and I was then able to create my template app.
I know this thread is old but I really hope this helps someone. Working with Cordova is a bitch at the best of times, let alone when vital online ponents are removed like this.
On OSX Yosemite even with sudo the error persists.
after digging a little bit more. i found the solution.
I have just run the cmd.exe as administrator. after that worked like magic.
I ran into this problem by not installing cordova as admin. I had to sudo npm install -g cordova
to get the create
mand to work.
本文标签: javascriptApache cordovaUnable to create an appStack Overflow
版权声明:本文标题:javascript - Apache cordova ,Unable to create an app - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745390035a2656556.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论