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 sear
I also had the same problem. i had an angular project. then created a cordova app inside called mobile
cordova create mobile
Then i tried to run
cordova platform add android
Which gave me the same error 'Current working directory is not a Cordova-based project'.
Solution : i have to go to the mobile folder ( from the command prompt cd mobile ) then i had to run the command there. Also there had to be a www folder in that mobile folder
Create www folder on root directory. If still it's a issue check ionic info and try to upgrade
You have to be in a project before you launch cordova plugin search bar code
.
This may be silly but in my case it was the config.xml
file.
I usually create it dynamically using a script, therefor it wasn't there after I cloned the repo. Ran the script to re-create it and everything worked again.
ionic integrations enable --add
then run the
ionic build
it will add all the necessary files
Happened to me also, probably from npm/node updates.
Worked for me the following:
npm install -g cordova
ionic cordova platform list