Issue with cordova projects

Hello, I tried creating a new cordova project. from the command line te project builds normally, and I can add android, and build, run android. However, when I try to do it from the IDE, setings=> languages and frameworks => Javascript => Cordova and add the working directory, I always get the working directory is not a cordova project

1
21 comments

Strangely that made the trick!

after I added an empty file containing only {} at ~/.config/configstore/cordova-config.json

it started detecting the project as a cordova project.

Thanks

1

Fine, thanks for update:)

The IDE actually runs cordova plugin list command to retrieve installed Cordova plugins when you choose the working directory. If this command fails for some reason, the error "working directory is not a cordova project" will likely be displayed...

1

The IDE is looking for config.xml file with <widget> component (https://cordova.apache.org/docs/en/latest/config_ref/index.html) when detecting if the current project is a Cordova app. Do you have this file in your project? What Cordova version do you use?

0

Yes I have the config.xml in the root directory with the widget component in it. I have the folder www in the root of the project as well

0

this should work then... Can you share a project that shows up the issue?

0

Attached is a sample project

0

Here is the project. Tried to upload it in the forum, but zip is not supported.

https://drive.google.com/file/d/177MlkDYgC1HRA04RLAjS2U1NRZ7pkWtr/view?usp=sharing

Thanks

0

Works fine for me using your project... Please can you share your idea.log (Help | Show log in<your file manager>)?

0

Thanks for the prompt response. Here is a link to the log file

https://drive.google.com/open?id=1TQkm71dgAzAMu0NMC_d7_WsD-3ibF8cH

0

can't see anything suspicious in the log... Can you backup the `~/.IntelliJIdea2019.1` folder and delete it to start with fresh configuration, plugins and caches? Remove it, then install Phonegap/Cordova plugin, open your project - does the issue persist?

0

Deleted the folder, reinstalled plugins, then started a fresh copy, again same issue.

I even installed installed a fresh copy on my mac (This one is on a linux machine), same thing.

0

Weird... Does the issue persist if you start IDE from terminal, using bin/idea.sh?

0

I always start the IDE from the terminal, and I get  same behaviour. Also I have the second installation on Mac book air, which is a fresh installation. Same issue there. Please find attached the idea.log for the Mcbook. This is for the same test project.

https://drive.google.com/open?id=1JIWd5If4F0nm-v8gJ1oCjH4WSO_j7aJ-

Clearly, either this is a bug in the IDE, or I am doing something fundamentally wrong. The installation on the Mcbook is a fresh installation without any patching.

0

Clearly there is a bug here. I have deleted the IDE totally, removed all the config files, downloaded the latest copy, installed the cordova plugin, and still shows the same.

I have spent sso much time in this issue, and still nothing. It really is frustrating and waste of time. I am purchasing the IDE in order to save time and effort, not vice versa.

0

Please try running cordova plugin list command in your project dirtectory - what is the result?

0

Here is the result

 

majed@majed-laptop:~/test2$ cordova plugin ls
cordova-plugin-inappbrowser 1.0.1 "InAppBrowser"
cordova-plugin-whitelist 1.3.3 "Whitelist"

0

please try a full path (usr/local/bin/cordova, not just cordova) - is there any difference?

0

Here is the response, same

/usr/local/bin/cordova plugin ls
cordova-plugin-inappbrowser 1.0.1 "InAppBrowser"
cordova-plugin-whitelist 1.3.3 "Whitelist"

0

strange... do you run this command in external terminal or in the built-in terminal?

0

That was in the built in terminal.

I tried from an external terminal, the output is the same.

However when I issue the command /usr/local/bin/cordova plugin list (and not ls)

I get the response the same but with an additional error as follows:

majed@majed-laptop:~/test2$ /usr/local/bin/cordova plugin list
cordova-plugin-inappbrowser 1.0.1 "InAppBrowser"
cordova-plugin-whitelist 1.3.3 "Whitelist"
Error: ENOENT: no such file or directory, open '/home/majed/.config/configstore/cordova-config.json'

0

does the issue persist if you add this file? It can be an empty json, like {}

0

Please sign in to leave a comment.