Phonegap 3.0命令行没有这样的文件或目录错误

时间:2013-10-15 05:13:54

标签: cordova command

在尝试添加插件或进行构建时,我收到以下错误。 config.xml确实存在于该位置

我正在使用的命令是

$ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git

$ phonegap build ios

错误

fs.js:427
 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
             ^
Error: ENOENT, no such file or directory '/Users/Tiltmac1/Sites/RBG/plantbank-   app/platforms/ios/PlantBank/config.xml'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/phonegap/node_modules/cordova/src/xml-helpers.js:107:27)
at Object.config_parser (/usr/local/lib/node_modules/phonegap/node_modules/cordova/src/config_parser.js:25:20)
at Object.ios_parser (/usr/local/lib/node_modules/phonegap/node_modules/cordova/src/metadata/ios_parser.js:61:19)
at doInstall (/usr/local/lib/node_modules/phonegap/node_modules/cordova/src/plugin.js:131:50)
at /usr/local/lib/node_modules/phonegap/node_modules/cordova/src/plugin.js:152:41
at runInstall (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/install.js:192:23)
at possiblyFetch (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/install.js:62:9)
at Object.installPlugin (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/install.js:42:5)

2 个答案:

答案 0 :(得分:0)

嗨" git"也是一个节点模块。你应该安装这样的插件。

npm install -g git

这会将git作为模块安装在您的节点源位置。

重启机器。

安装phonegap插件:C:\ Users \ user1 \ yourprojectname> cordova插件添加https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git

您将得到以下回复:从" https://git-wip-us.apache.org/repos/asf/cordova-plugin-cam era.git获取插件" ...开始安装" org.apache.cordova.camera" for android准备安装在android上的android项目org.apache.cordova.camera。

答案 1 :(得分:-2)

可能是所有空间吗? “RBG / plantbank- app / platforms”