dpa99c / cordova-custom-config

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

[Bug][Android] '"{{proj_path}}\platforms\android\cordova\version"' is not recognized as an internal or external command, operable program or batch file. #170

Closed ebhsgit closed 2 years ago

ebhsgit commented 2 years ago

Bug report

Current behavior:

Running cordova prepare android fails with the following error

cordova-custom-config: Skipping auto-restore of config file backup(s)
Error: Command failed: "{{proj_path}}\platforms\android\cordova\version"
'"{{proj_path}}\platforms\android\cordova\version"' is not recognized as an internal or external command,
operable program or batch file.

    at ChildProcess.exithandler (child_process.js:308:12)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:443:11)
    at Socket.emit (events.js:314:20)
    at Pipe.<anonymous> (net.js:676:12) {
  killed: false,
  code: 1,
  signal: null,
  cmd: '"{{proj_path}}\\platforms\\android\\cordova\\version"'
}
[ERROR] An error occurred while running subprocess cordova.

Project was compiling fine before adding this plugin. Then added plugin via: cordova plugin add cordova-custom-config No changes to any files (other than package.json andpackage-lock.jsonfrom adding the plugin) Then runcordova prepare android`. And gets the error

The issue seems to be a conflict with cordova-plugin-add-swift-support

If I remove cordova-plugin-add-swift-support, this plugin works.

Expected behavior:

The project should compile

Steps to reproduce:

Test project that shows this issue

https://github.com/ebhsgit/custom-config-test

Check out test project and run cordova android prepare

Screenshots

Environment information

Android build issue:

Related code:

insert any relevant code here such as plugin API calls / input parameters

https://github.com/ebhsgit/custom-config-test

Console output

console output ``` // Paste any relevant JS/native console output here ```


**Other information:**
ebhsgit commented 2 years ago

Not an issue with plugin

Issue is in cordova-plugin-add-swift-support