Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova plugins with js-modules without a name attribute are installed incorrectly #1958

Closed
tlancina opened this issue Sep 14, 2019 · 1 comment · Fixed by #1959
Closed

Comments

@tlancina
Copy link
Contributor

Description of the problem:

When a Cordova plugin has a js-module with no name attribute, the cordova.define id becomes ${pluginId}.undefined, which can block deviceready.

See:
https://github.com/apache/cordova-common/blob/d73d7fab70d2a5110bae174e48065065373732c9/src/PlatformJson.js#L247

https://github.com/apache/cordova-ios/blob/4562ef5608d57d471dc11212c9f432762886a32d/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js#L194

vs.

"id": "${pluginId}.${jsModule.$.name}",

data = `cordova.define("${pluginId}.${jsModule.$.name}", function(require, exports, module) { \n${data}\n});`;

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 14, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant