2013-07-29 19 views
9

我下面就http://phonegap.com/install/PhoneGap的命令行:WWW不包含的index.html

npm install -g phonegap

似乎是工作的過程中,它會創建下應用程序數據\漫遊\故宮\ node_modules \ PhoneGap的一個40+ MB的文件夾

然後,

phonegap create my-app

產生以下錯誤:

[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

我也試圖與該文檔在這裏:http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface

這是發生了什麼:

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

你有一些想法,爲什麼出現這種情況?由於

回答

1

我解決了這個問題,我自己通過設置HTTPS代理:

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

除正常代理設置外:

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

刪除3.0.0目錄中的適當位置:

〜/ .cordova/lib中/ WWW/PhoneGap的(PhoneGap的) 或Windows中的PhoneGap的主目錄

〜/ .cordova/lib/www/cordova(cordova) 或Windows中的cordova主目錄

然後嘗試再次創建應用程序。

+2

此答覆應標記爲答案!謝謝傑夫 – Michael

+0

工作對我很好。謝謝JeffC – ilight

+0

我也爲Cordova 3.3.0工作過。 – Paul

2

除了JeffC的回答,擺脫了一個錯誤的:

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

我也不得不在〜/ .profile文件

刪除我的舊的代理服務器設置(這我已經忘記了)

# export http_proxy=url:@aproxy:portnumber

相關問題