OlivierM
OlivierM

Reputation: 771

Phonegap command line: www does not contain index.html

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

Upvotes: 9

Views: 3005

Answers (3)

andy
andy

Reputation: 550

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

Upvotes: 2

darknight
darknight

Reputation: 26

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>

Upvotes: 1

JeffC
JeffC

Reputation: 210

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.

Upvotes: 21

Related Questions