Cordova-当前工作目录不是基于Cordova的项目 [英] Cordova - Current working directory is not a Cordova-based project
本文介绍了Cordova-当前工作目录不是基于Cordova的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为我的移动项目使用phonegap.我的问题是,当我尝试使用cordova CLI搜索phonegap插件时为什么会出现此错误?我在终端中运行此命令以搜索phonegap插件
I'm using phonegap for my mobile project. My question is why I got this error when I try to search phonegap plugin using cordova CLI? I run this command in terminal to search phonegap plugin
cordova plugin search bar code
完整的错误消息
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$
推荐答案
启动cordova plugin search bar code
之前必须先进入项目.
You have to be in a project before you launch cordova plugin search bar code
.
这篇关于Cordova-当前工作目录不是基于Cordova的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文