安装PhoneGap 3.x.

时间:2014-06-09 08:11:37

标签: android node.js cordova

使用npm安装PhoneGap 3.X时,会收到一些错误,如(下图):

installation of PhoneGap

注意:我已经安装了NodeJS

2 个答案:

答案 0 :(得分:1)

尝试安装旧版本:

npm install -g phonegap@3.4

但是如果要安装最新版本。按照此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

答案 1 :(得分:0)

您可以在安装时添加版本号。例如:

npm install -g phonegap@3.4

希望,这会对你有帮助。