我爲我的移動項目使用phonegap。我的問題是爲什麼當我嘗試使用cordova CLI搜索phonegap插件時出現此錯誤?我在終端運行這個命令來搜索的PhoneGap插件Cordova - 當前工作目錄不是基於Cordova的項目
完整的錯誤消息
Last login: Wed Jan 22 15:04:09 on ttys000
Mohammads-MacBook-Pro:~ mohammadnurdin$ cd /Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native
Mohammads-MacBook-Pro:native mohammadnurdin$ cordova plugin search bar code
/usr/local/lib/node_modules/cordova/src/util.js:57
throw new Error('Current working directory is not a Cordova-based
^
Error: Current working directory is not a Cordova-based project.
at Object.module.exports.cdProjectRoot (/usr/local/lib/node_modules/cordova/src/util.js:57:19)
at CLI.plugin (/usr/local/lib/node_modules/cordova/src/plugin.js:28:36)
at new CLI (/usr/local/lib/node_modules/cordova/src/cli.js:109:30)
at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
Mohammads-MacBook-Pro:native mohammadnurdin$
如何呢?你能給我一個場景嗎? –
使用cd命令:cd projectname – QuickFix