14

I was trying to follow this tutorial: https://www.youtube.com/watch?v=SOOjamH1bAA. But I couldn't even begin, because from what it looks like, my project does not have a config.xml file and I tried looking up the documentation online, and it says nothing about it, I also tried searching how to generate it, didn't find anything, why am I missing this config.xml? how to generate this file? Here's a link to display where its supposed to be, and it's not there:

enter image description here

heres the ionic info output:

Ionic: ionic (Ionic CLI) : 4.1.1 (C:\Users\Publio\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.1.11 System: NodeJS : v8.11.3 (C:\Program Files\nodejs\node.exe) npm : 6.3.0 OS : Windows 10
  • when you did `ionic start app `.. what did you select for cordova option? – Suraj Rao Aug 24 '18 at 11:11
  • Also can you add the output of `ionic info` to the question? – Suraj Rao Aug 24 '18 at 11:13
  • nothing at first, but it kept asking me if i wanted to install it, and back then i didn't need it, now i tried doing npm install -g cordova and nothing happened, also i recently updated my ionic version, and the messages suggesting me to install cordova were gone –  Aug 24 '18 at 11:14
  • can you [edit] it in the question? – Suraj Rao Aug 24 '18 at 11:16
  • also `npm -g cordova` just installs the global cordova cli and not the integration to your app – Suraj Rao Aug 24 '18 at 11:20

4 Answers4

34

From ionic cli v4, you need to set cordova to your ionic app if you are creating an ionic cordova application. config.xml is used by cordova platform.

You can enable the integration after creating the app as well according to documentation.

ionic integrations enable cordova
Stefan Rein
  • 8,084
  • 3
  • 37
  • 37
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
6

If you cannot recover or don't have a config.xml file here is a solution I found from, just run ionic integrations enable cordova --add and if it asks to overwrite config.xml, give yes and if it asks to overwrite resources, give no because it will overwrite your resources folder and you will lose many important things

dilanSachi
  • 562
  • 6
  • 14
0

run cmd

ionic integrations enable cordova --add

update config.xml file and package.json file

Sushil
  • 670
  • 7
  • 14
-2

create new project and copy config.xml file and create a new file with name config.xml and paste in it

Ammar Tariq
  • 799
  • 2
  • 13
  • 29