2014-06-09 76 views
1

在使用NPM安裝的PhoneGap 3.X,收到了一些錯誤,如(下圖):安裝的PhoneGap 3.X

installation of PhoneGap

注:我已經的NodeJS安裝

+0

你安裝你的SDK? – AppleBud

+0

你的意思,(只需安裝node.js)按照PhoneGaph.com步驟 – mwafi

回答

1

嘗試安裝舊版本:

npm install -g [email protected] 

但是,如果你想安裝最新版本。按照此post中建議的步驟操作。

Download the zip of phonegap-cli repo (https://github.com/phonegap/phonegap-cli/archive/master.zip) 
Unzip it 
Open the package.json file and find the cordova-lib entry in dependencies (line 32) 
Change the value to 0.21.3 which is the last version. 
Recreate an archive of the folder to the tar.gz format 

Open your CLI and run this command: 

npm install -g path/to/archive/phonegap-cli-master.tar.gz 
0

您可以添加版本號,同時安裝。例如:

npm install -g [email protected] 

希望,這會幫助你。