Skip to content

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

@HarelM

Description

@HarelM

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions