每当我试图在Linux中创建一个PhoneGap 3.0项目(Lubuntu13.04,节点v0.6.19)时,我都会收到以下错误:
devweinre:test kelvin$ phonegap build android
[phonegap] detecting Android SDK environment...
[phonegap] using the remote environment
/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/common/config/global.js:45
fs.exists(filepath, function(exists) {
^
TypeError: Object #<Object> has no method 'exists'
at Object.load (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/common/config/global.js:45:8)
at PhoneGapBuild.<anonymous> (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/phonegap-build/login.js:60:19)
at PhoneGapBuild.login (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/phonegap-build/login.js:47:13)
at PhoneGapBuild.<anonymous> (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/phonegap-build/build.js:60:10)
at PhoneGapBuild.build (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/phonegap-build/build.js:40:13)
at RemoteBuildCommand.execute (/usr/local/lib/node_modules/phonegap/lib/phonegap/remote.build.js:74:19)
at RemoteBuildCommand.run (/usr/local/lib/node_modules/phonegap/lib/phonegap/remote.build.js:54:10)
at Object.build (/usr/local/lib/node_modules/phonegap/lib/phonegap/util/command.js:28:25)
at /usr/local/lib/node_modules/phonegap/lib/phonegap/build.js:78:28
at /usr/local/lib/node_modules/phonegap/node_modules/cordova/src/platform.js:189:9我一直在四处寻找答案,但在这个问题上似乎没有太多的答案。我能找到的唯一真正相关的问题是phonegap + Ubuntu 12.04。但这对我没有用。每次构建(Android/iOS/WP8 8等)都会出现这种情况。我知道iOS实际上不会工作,但它肯定会创建一个工作项目--而且Android应该能工作--我已经安装了所有的先决条件。
有人能帮我吗,因为我不知道该如何工作(我不是CLI的专家)。
非常感谢!
发布于 2013-09-27 09:24:47
修正了它--我的应用程序名中有一个撇号,phonegap试图执行的命令因此无法运行。
https://stackoverflow.com/questions/19005546
复制相似问题