Current working directory is not a Cordova based project
From @reynoldbhatia on April 14, 2016 20:16
I have everything setup but when I try running ionic platform add android
it just gives me an error saying Current working directory is not a Cordova based project

Copied from original issue: driftyco/ionic#6174
From @dhirajb1989 on April 15, 2016 2:11
Is config.xml present there???
From @reynoldbhatia on April 15, 2016 13:58
Yes there is.
@reynoldbhatia Hello! Sorry your having an issue getting started with your ionic app! Did you create this app with ionic start or did you git clone it from github? Also, do you have cordova installed?
From @reynoldbhatia on April 15, 2016 15:28
I created it using ionic start. And yes, I have Cordova installed. Cordova create also works. The project created with Cordova create also gives the same error when I try adding the platform.
@reynoldbhatia thanks for the info! So im gonna defer this issue over to the ionic-cli repo as the guys over there will be able to help you better with this issue than i can.
Could you post the output of ionic info please?
I am re-installing everything. I'll send it once it is done. Thanks.
The output to ionic info @tlancina
Also, If I run cordova platform add android from inside the project folder, it works fine. But ionic platform add android gives the same error.
Could you run it with the --verbose flag and post the out put please?
ionic platform add android --verbose, thanks!
On Tue, Apr 19, 2016 at 10:20 AM Reynold Bhatia [email protected] wrote:
Also, If I run cordova platform add android from inside the project folder, it works fine. But ionic platform add android gives the same error.
— You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic-cli/issues/935#issuecomment-211975724
I would like to add.... I have 2 other systems running on Windows 8.1 and Windows 10 which work fine. The system I am working on currently is Windows 7. Just in case, if the operating system needs something more to be done while setup.
@reynoldbhatia what version of npm are you using? npm 2 or npm 3?
2.15.1
Ahh, could you try updating to npm 3? We've seen a couple of issues related to npm 2. To update npm you run npm install -g npm.
Oh and then remove your node modules and then run npm install again.
I did as you said. It did not work. Still giving me the same error.
Still getting the same error.
For posterity: usually the solution is to make sure there's a www/ directory inside the root directory.
mkdir www in your project folder and it works well.