Whenever I attempt to create a PhoneGap 3.0 project in Linux (Lubuntu 13.04, node v0.6.19) I receive the following error:
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
I have been looking around for an answer and there doesn't appear to be much on the issue. The only really relevant question I could find was phonegap + Ubuntu 12.04. But this did not work for me. This happens for every build (Android/iOS/WP8 etc.). I know iOS will not actually work, but surely it will create a working project - and Android should work - I have all the prerequisites installed.
Can someone help me, as I am not sure how to get this working (I am not an expert with CLI).
Many thanks!