Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current working directory is not a Cordova-based project #43

Closed
justmyfreak opened this issue Apr 22, 2014 · 11 comments
Closed

Current working directory is not a Cordova-based project #43

justmyfreak opened this issue Apr 22, 2014 · 11 comments

Comments

@justmyfreak
Copy link

I tried to follow along https://www.npmjs.org/package/generator-ionic

npm install -g generator-ionic
mkdir my-ionic-project && cd $_
yo ionic

Then I tried to cordova platform add ios and it said 'Current working directory is not a Cordova-based project'. But if I tried to grunt platform:add:ios, it works.

I tried to find solution for it and it seems that Cordova application should have .cordova directory along with config.xml and www directory should contain config.xml as well.

I copied config.xml using cp config.xml .cordova and cp config.xml www. Then run cordova platform add ios and it worked.

Is this happen to any one or just me?

@diegonetto
Copy link
Owner

What version of Cordova are you running? cordova -v I believe you might be using an older version.

All grunt does is delegate to a locally packed cordova-cli module, so using cordova directly should work.

Here's a great post by @hollyschinsky about recent changes to Cordova http://devgirl.org/2014/02/10/3-cordova-cli-changes/

@justmyfreak
Copy link
Author

I was using 3.3. I updated to 3.4 and it works well.
Thank you :)

@jameswagoner
Copy link

I don't understand what the solution to this issue is. I have Cordova 3.5 installed and using cordova command itself still reports that the directory is not a cordova project

@sotir-ls
Copy link

Exactly! And still not a proper solution for this. Could anyone actually give a proper setup process as this goes far beyond annoying!

Thank you.

@diegonetto diegonetto reopened this Sep 15, 2014
@justmyfreak
Copy link
Author

I'm on version 3.4.1-0.1.0 and I don't have this problem again.

@sotir-ls
Copy link

I am not sure if the solution to this is not related to cordova latest version. Since it is working for some, yet I was trying 4+ hours yesterday and gave up.

@justmyfreak
Copy link
Author

@dexteriti I updated my cordova version to 3.5.0-0.2.7 then created new project using ionic generator. I ran cordova command cordova platform add ios and it worked well. What is your cordova version

@sotir-ls
Copy link

@justmyfreak It's 3.5.0. I did uninstalled cordova globally and then installed it again. It doesn't even install the plugins. Keeps checking if the folder is Cordova project with no success.

@justmyfreak
Copy link
Author

which Cordova command you run?

@sotir-ls
Copy link

@justmyfreak About what?

Sorry, this conversation is ongoing here - ionic-team/ionic-framework#2213 (comment)

@diegonetto
Copy link
Owner

Also going on here - #33 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants