【发布时间】:2014-07-29 18:01:56
【问题描述】:
使用 npm 安装 PhoneGap 3.X 时,会收到一些错误,例如(下图):
注意:我已经安装了 NodeJS
【问题讨论】:
-
你的sdk安装了吗?
-
你的意思,(只需安装 node.js)按照 PhoneGaph.com 的步骤操作
使用 npm 安装 PhoneGap 3.X 时,会收到一些错误,例如(下图):
注意:我已经安装了 NodeJS
【问题讨论】:
尝试安装旧版本:
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
【讨论】:
您可以在安装时添加版本号。例如:
npm install -g phonegap@3.4
希望对你有所帮助。
【讨论】: