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

Package.json is updated incorectly when adding platform? #537

Open
3 tasks done
HarelM opened this issue Oct 27, 2020 · 3 comments
Open
3 tasks done

Package.json is updated incorectly when adding platform? #537

HarelM opened this issue Oct 27, 2020 · 3 comments

Comments

@HarelM
Copy link

HarelM commented Oct 27, 2020

Copied from apache/cordova#252

Bug Report

When I use a clean installation of my project and run cordova platform add android my package.json file gets changed significantly, and incorrectly.

What is expected to happen?

package.json should be respected

What does actually happen?

package.json get overwritten. Also dependencies are getting the wrong version

Information

It might be because I have the packages registered in dependencies and not devDependencies, I don't know...

Command or Code

Project can be found here:
https://github.com/IsraelHikingMap/Site/tree/master/IsraelHiking.Web

Environment, Platform, Device

Currently testing on Android

Version information

Cordova cli: 10.0
cordova-android: 9.0

This started happening after the upgrade to 10.0 and android 9.0.

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@HarelM
Copy link
Author

HarelM commented Oct 27, 2020

Even after moving everything to devDependencies the cordova-ios version I'm using which has a bug I fixed but was not released yet is not respected.
See here:
https://ci.appveyor.com/project/IsraelHikingHost/site/builds/35979455/job/746gx1cajxc9867v
See the code here:
https://github.com/IsraelHikingMap/Site/tree/d4fc90b962cdb38df408e5cb87ca62e7c0649387/IsraelHiking.Web

@HarelM
Copy link
Author

HarelM commented Oct 27, 2020

I opened the above issue in cordova-fetch repo:
apache/cordova-fetch#92

Another issue I'm now facing is the following, which I'm not sure is a bug in the plugin or in cordova-cli, but it used to work in previous version, so I believe it deserves looking into:

When I add the following plugin:
@mauron85/cordova-plugin-background-geolocation it is added success fully to package.json and to the project but it adds a configuration with the name of "cordova-plugin-background-geolocation" which is another plugin that exists and when the CI runs cordova platform add ios/android it gets the wrong plugin.
Again, not sure where the bug is...

@kuramsai
Copy link

kuramsai commented Dec 5, 2021

Facing the same issue in Ionic.
"cordova-android": "^10.0.0",
gets replaced by
"cordova-android": "9.1.0",

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