Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap command line: www does not contain index.html

Tags:

npm

cordova

I am following the procedure on http://phonegap.com/install/

npm install -g phonegap

seems to be working, it creates a 40+ Mb folder under AppData\Roaming\npm\node_modules\phonegap

then,

phonegap create my-app

produces the following error:

[error] downloaded www assets in C:\Users\.cordova\lib\www\phonegap\3 .0.0\www does not contain index.html, or www subdir with index.html

I tried also with the documentation here: http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface

This is what happens :

cordova create hello com.example.hello HelloWorld [TypeError: Cannot read property 'length' of undefined]

Do you have some ideas why this happens ? Thanks

like image 497
OlivierM Avatar asked Jul 29 '13 15:07

OlivierM


3 Answers

Delete the 3.0.0 directory in the appropriate place:

~/.cordova/lib/www/phonegap (phonegap) or the phonegap home directory in Windows

~/.cordova/lib/www/cordova (cordova) or the cordova home directory in Windows

Then try to create the app again.

like image 198
JeffC Avatar answered Nov 29 '22 18:11

JeffC


In addition to JeffC's answer, to get rid of the next error:

cordova create hello com.example.hello HelloWorld [TypeError: Cannot read property 'length' of undefined]

I also had to remove my old proxy settings (which I'd forgotten about) in ~/.profile

# export http_proxy=url:@aproxy:portnumber

like image 39
andy Avatar answered Nov 29 '22 17:11

andy


I fixed this issue myself by setting the https-Proxy:

npm config set https-proxy http://<https-proxy-server>:<https-port>

in addition to the normal proxy settings:

npm config set proxy http://<proxy-server>:<port>
like image 32
darknight Avatar answered Nov 29 '22 16:11

darknight