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 Cordova-based project. #2213

Closed
sotir-ls opened this issue Sep 15, 2014 · 24 comments
Closed

Current Working Directory is not Cordova-based project. #2213

sotir-ls opened this issue Sep 15, 2014 · 24 comments
Assignees

Comments

@sotir-ls
Copy link

Updated cordova. [x]
Inside the project folder [x]

Error still exists. Please give me solution to this.

@adamdbradley
Copy link
Contributor

Is your working directory the one with the config.xml file?

@sotir-ls
Copy link
Author

Yes, I have tried pretty much every solution from Stackoverflow as well as from Ionic forums and the problem stays. What annoys me the most is that it WAS actually working. No idea what i did wrong.

Now it doesn't even manage to install the cordova plugins.

@adamdbradley
Copy link
Contributor

Are you able to run just cordova without ionic? Exactly what commands are you running? Are you on windows, ubuntu, OSX?

@sotir-ls
Copy link
Author

I am running Win7/64bit/.

Yes, I am able to run cordova. I started an app with phonegap before and it was running just fine. I just tried to create a project only with cordova and worked fine.

I am following Ionic homepage and I already tried to install/uninstall globally both ionic and cordova a couple of times.

But when I try to $ ionic start myApp I end up without the plugins and with an error "Current ...bla bla...cordova-based project".

@mhartington
Copy link
Member

@dexteriti hey there! So just curious, do you have git setup on your machine?

@sotir-ls
Copy link
Author

@mhartington Hi, Mike,

Yes, I do. What am I doing wrong?

@mhartington
Copy link
Member

@dexteriti so I did some research and wasn't able to come up with a reason for why this happened.
So just to make sure I know the whole picture, can we go over what was done before this error?

  1. You were working on a project created with the ionic cli, everything works fine.
  2. You updated cordova, sudo npm update -g cordova
  3. While still in the project directory, you updated the projects. cordova platform update <platform>
  4. Tried to install a new plugin, ionic plugin add <plugin>, error comes up.

Did I miss anything?

@sotir-ls
Copy link
Author

@mhartington Thank you for your response.

I had cordova installed and I checked the version (3.5.0) then continued to install ionic. Started with creating tabs app and tried to emulate it when I had to wait a lot for actual emulation to run.

I went to download the Genymotion. Next time when I tried to run under android I end up having the error. As I wasn't sure if this is related to cordova or Ionic, so I tried to run another project when I again had the same problem.

The last try (many times last try) was actually globally uninstaling cordova and installing it again. Then creating another project and again ended with the error. I haven't tried to update cordova as their latest official version is the same as mine.

If that helps, first time I was able to install Ionic with plugins, but with the continuing installations plugin installation failed and I had to do it remotely.

One think is for sure, if I follow the walkthrough from ionic website I am having the error.

Thank you again.

@sotir-ls
Copy link
Author

And now for every : ionic command I end up with an error about "Current working directory is not a Cordova-based project".

@mhartington
Copy link
Member

Hmm, any chance you could provide the follow version numbers?

$ node -v
$ ionic -v
$ gulp -v
$ npm -v

@sotir-ls
Copy link
Author

nove -v --- 0.10.30
ionic -v --- 1.2.4
gulp -v --- local version : 3.8.8
npm -v --- 1.4.24

@somethingnew2-0
Copy link

What command prompt or shell are you running on Windows?

@sotir-ls
Copy link
Author

I am using windows 7 cmd and just tried with Git Bash. Same result.

Crushes when it tries to initialize cordova project.

@JamiesonWarner
Copy link

Could you post the ouput of echo %cd% (in cmd) or pwd in Git Bash?

@sotir-ls
Copy link
Author

@JamiesonWarner

C:\Projects\App - cmd

Same in git bash.

@sotir-ls
Copy link
Author

As I am sure this is quite annoying for you, I will try to do it all over again (last time hopefully) and I'll post the result step by step.

@sotir-ls
Copy link
Author

Here is what I am doing:

$ npm install -g cordova
$ npm install -g ionic

$ ionic start newApp tabs

Update config.xml
Initializing cordova project
Current working directory is not a Cordova-based project.
Unable to add plugins. Perhaps your version of Cordova is too old. Try updating
(npm install -g cordova), removing this project folder, and trying again. (CLI v
1.2.5)

That is just about it. Hope is something easy to fix, as this is taking me way too long.

However, I am able to cd to the project and $ ionic serve and works fine.

@diegonetto
Copy link

@dexteriti Can you try running cordova create . inside of a new empty directory and paste the output here?

I had a Windows user of my generator getting a CERT_UNTRUSTED error when the initial cordova create command was executed as mentioned here - http://stackoverflow.com/questions/21752198/error-cert-untrusted-while-creating-cordova-project

Might not be what you're experiencing but thought I'd check!

@sotir-ls
Copy link
Author

HURRAY! Thank you, @diegonetto!

cordova create . fixed the issue. Which means that I somehow managed to screw my git settings and had to create the folder manually which I didnt.

Stupid me, obviously and thank you everyone for your help.

@somethingnew2-0
Copy link

Hurray! 👏

@diegonetto
Copy link

👍

@nathanieldavis
Copy link

I am having the same exact problem. Except my error is this

Nates-MacBook-Pro:todoapp TheRainmaker$ cordova create .
Creating a new cordova project with name "HelloCordova" and id "io.cordova.hellocordova" at location "/Users/TheRainmaker/todoapp"
Path already exists and is not empty: /Users/TheRainmaker/todoapp

This is happening on the kitchen sink download from Ionic and on one other demo I downloaded. But all my other projects and demos are working just fine. I assume this is an easy fix? But if anyone could help me out it would be much appreciated.
Thanks

@somethingnew2-0
Copy link

@nathanieldavis I don't believe this is related, however your problem should be easy to solve. I would suggest posting your issue on our forum. Also, have a look at this forum thread as it may help setting up the kitchen sink demo.

@nathanieldavis
Copy link

Thanks!

@ionic-team ionic-team locked and limited conversation to collaborators Oct 22, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants