You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/05/18 02:40:14 UTC

[GitHub] [cordova-android] breautek commented on issue #1360: `add android` command changes package.json

breautek commented on issue #1360:
URL: https://github.com/apache/cordova-android/issues/1360#issuecomment-1129507667

   > No changes to package.json
   
   the add command will ultimately make edits to `package.json` for 2 reasons:
   
   1. It will call on NPM behind the scenes, which will manipulate your `package.json` accordingly
   2. Cordova will also change `cordova` object and rewrite your `package.json`.
   
   If you had your `package.json` ordered or formatted a specific way, due to the nature of JavaScript objects having their keys in an nondeterministic order, the file may change or be re-ordered.
   
   > package.json gets updated with github:...
   
   This is something that [NPM](https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major) does when it finds a GitHub repo.
   
   > Git dependencies on known git hosts (GitHub, BitBucket, etc.) will always attempt to fetch package contents from the relevant tarball CDNs if possible, falling back to git+ssh for private packages. resolved value in package-lock.json will always reflect the git+ssh url value. **Saved value in package.json dependencies will always reflect the canonical shorthand value.**
   
   I've attempted to clone the app to determine what you're seeing exactly, but `IsraelHiking.Web/` doesn't appear to contain a cordova project (I see the `config.xml` file but no `www` folder and Cordova seems to believe that the folder is not a cordova project.
   
   > Some plugin fetch do not happen, or fail thus causing the app to crash
   
   All plugin fetching is handled by NPM, so if you're experiencing plugin fetch issues, I'd suggest ensuring that you're using the latest NPM version available including any patch versions. It may help to also delete `node_modules` as well as `package-lock.json` as sometimes having a package existing in either or can cause issues in my experience, particularly when trying to upgrade them.
   
   Closing because there doesn't seem to be any issues related to the Cordova codebase.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org