dpa99c/cordova-android-support-gradle-release

Cordova compile android OK but not cordova run android

pom421 opened this issue · 3 comments

One other problem today ;)

With Cordova CLI 7.1.1, when i type "cordova run android", i obtain :

Error: cordova-android-support-gradle-release: Failed to load dependencies. If using cordova@6 CLI, ensure this plugin is installed with the --fetch option: Cannot find module 'xml2js'

When i use "cordova compile android", the apk is generated without issue.

The plugin includes xml2js as a dependency in its package.json. Therefore it relies on being installed by the cordova-fetch mechanism which will run npm install in the context of the package.json to install the module into node_modules/.
If the node_modules/ directory was removed after plugin installation, this would also cause this error.

Can this be closed?

I have downgraded my CLI, I'm using now 7.0.1 and it's OK.
You can close it, I'll reopen it later if i face the same issue again.