dpa99c / cordova-custom-config

Cordova/Phonegap plugin to update platform configuration files based on preferences and config-file data defined in config.xml
317 stars 85 forks source link

config.xml not where expected #99

Closed bpappin closed 7 years ago

bpappin commented 7 years ago

In our build, the config.xml is in the myapp/www directory, but the plugin expects it in myapp/ instead. This results I the error:

cordova-custom-config: Error loading dependencies (ENOENT: no such file or directory, open '/Users/myusername/Workspace/myapprepo/myapp/config.xml') - attempting to resolve

Is there any way to specify where the config file is?

dpa99c commented 7 years ago

The standard location for config.xml is in the project root for Cordova CLI projects (according to the Cordova docs) although old versions (<3.3) placed it in www/config.xml hence Cordova still supports that location for backward compatibility.

I see no reason going forward for this plugin to support specifying the location of config.xml or to expect it to be anywhere other than the project root.

If you don't want to move it to the project root, you could work around it with a symlink:

ln -s config.xml www/config.xml
bpappin commented 7 years ago

I simply moved it up without any difficulty. I'm a native guys, so I just needed to be able to support the cordova version for legacy deployment.