【问题标题】:install PhoneGap 3.x安装PhoneGap 3.x
【发布时间】:2014-07-29 18:01:56
【问题描述】:

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

注意:我已经安装了 NodeJS

【问题讨论】:

  • 你的sdk安装了吗?
  • 你的意思,(只需安装 node.js)按照 PhoneGaph.com 的步骤操作

标签: android node.js cordova


【解决方案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

【讨论】:

    【解决方案2】:

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

    npm install -g phonegap@3.4
    

    希望对你有所帮助。

    【讨论】:

      猜你喜欢
      • 2019-09-05
      • 2017-08-09
      • 1970-01-01
      • 2018-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-18
      • 2015-02-22
      相关资源
      最近更新 更多