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-plugin-device@2.1.0 breaks existing projects that (npm tilde) reference ^2.x.x and use Cordova versions < 9 #169

Closed
1 task
hexagon-ecosys opened this issue Apr 23, 2022 · 1 comment

Comments

@hexagon-ecosys
Copy link

Bug Report

Problem

cordova-plugin-device@2.1.0 breaks existing projects that (npm caret) reference ^2.x.x and use Cordova versions < 9

What is expected to happen?

cordova-plugin-device@2.1.0 should not break existing projects that (npm caret) reference ^2.x.x and use Cordova versions < 9

What does actually happen?

Installing "cordova-plugin-device" for android
Failed to restore plugin "cordova-plugin-device" from config.xml. You might need to try adding it again. Error: code: engine.platform or engine.scriptSrc is not defined in custom engine "cordova-electron" from plugin "cordova-plugin-device" for android warn

Information

Clone https://github.com/hexagon-ecosys/cordova812-helloWorld and follow its README

Command or Code

cordova prepare

Environment, Platform, Device

Version information

node 16.14.2
npm 8.5.0
cordova 8.1.2

This is probably not a supported configuration, but hopefully this bug helps someone else.

There are a couple of solutions -

  1. hard-set the reference to 2.0.3 to NOT pull the electron support related changes introduced in 2.1.0.
  2. Upgrade Cordova to at least 9. I tested 9.0.0, 10.0.0 and 11.0.0 where this problem is not reproducible.

Checklist

  • [x ] I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • [x ] I included all the necessary information above
@breautek
Copy link
Contributor

use Cordova versions < 9

This cordova cli version is out of support. Generally speaking we don't support or provide backports to older releases. We only move forward.

For that reason, I'm closing this issue as won't fix. It's If my understanding that this issue is not reproducible on the current stable releases. If I'm wrong, please let us know and we can reopen this issue, or open a new ticket.

Kind regards,
Norman

@hexagon-ecosys hexagon-ecosys changed the title cordova-plugin-device@2.1.0 breaks existing projects that (npm tilde) reference ~2.x.x and use Cordova versions < 9 cordova-plugin-device@2.1.0 breaks existing projects that (npm tilde) reference ^2.x.x and use Cordova versions < 9 Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants