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 2020/10/18 22:36:46 UTC

[GitHub] [cordova-fetch] ebhsgit opened a new issue #92: cordova-android referencing git repo is changed to npm package version when performing a release build

ebhsgit opened a new issue #92:
URL: https://github.com/apache/cordova-fetch/issues/92


   # Bug Report
   cordova-android referencing git repo is not respected, and is being changed to npm package version when performing a release build
   
   ## Problem
   
   When cordova-android is in devDependencies, and is referencing a git branch (rather than a npm package version).
   As part of the release build (with clean environment - no platform and plugin folder), cordova-android reference is changed to latest stable npm package.
   
   **example package.json**
   "devDependencies": {
    ....
       "cordova-android": "git+https://github.com/8bhsolutions/cordova-android.git#9.0.x-mod",
    .....
   }
   
   ### What is expected to happen?
   The reference should remains unchanged.
   
   
   ### What does actually happen?
   The reference gets changed to 9.0.0, and the build process
   
   "devDependencies": {
    ....
       "cordova-android": "9.0.0",
    .....
   }
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   After upgrading `cordova-android` to 9.0 and `cordova` to 10.0.0, when I build I notice that some of my cordova plugins where moved to `devDependencies`.
   
   It seems that only the cordova plugins which reference git repos were moved. The plugins that reference a npm package release were still kept in `dependencies` node.
   
   Then googling for why this happened, I stumbled across the apache/cordova-fetch#64, which is released in `cordova-fetch` 3.0.0
   
   So I decided to manually move all the other cordova plugins, and the cordova platform.
   
   If I leave `cordova-android` in `dependencies` node, the build does not touch it.
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   When I checkout a clean copy of my source code. So the node_module, platform and plugins folder will be fetched as part of the build process.
   
   I run then following command
   
   * npm install first.
   * ionic cordova build android --release
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   Windows 10
   VS Code: 1.50.1
   Node: 12.19.0
   
   Release build for Android
   
   Debug build seems ok
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   ** cordova info **
   Cordova Packages:
   
       cli: 10.0.0
           common: 4.0.2
           create: 3.0.0
           lib: 10.0.0
               common: 4.0.2
               fetch: 3.0.0
               serve: 4.0.0
   
   Project Installed Platforms:
   
       android: 9.0.0
   
   Environment:
   
       OS: Microsoft Windows 10 Pro 10.0.19041 (19041) (win32 10.0.19041) x64
       Node: v12.19.0
       npm: 6.14.8
   
   
   **ionic info**
   
   Ionic:
   
      Ionic CLI          : 5.2.3 (C:\Users\Ben\AppData\Roaming\npm\node_modules\ionic)
      Ionic Framework    : ionic-angular 3.9.2
      @ionic/app-scripts : 3.2.4
   
   Cordova:
   
      Cordova CLI       : 10.0.0
      Cordova Platforms : android 9.0.0
      Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 3.1.2, (and 42 other plugins)
   
   Utility:
   
      cordova-res : not installed
      native-run  : 0.2.8
   
   System:
   
      Android SDK Tools : 26.1.1 (C:\Android_Home\android-sdk)
      NodeJS            : v12.19.0 (C:\Program Files\nodejs\node.exe)
      npm               : 6.14.8
      OS                : Windows 10
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


----------------------------------------------------------------
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.

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


[GitHub] [cordova-fetch] HarelM commented on issue #92: cordova-android referencing git repo is changed to npm package version when performing a release build

Posted by GitBox <gi...@apache.org>.
HarelM commented on issue #92:
URL: https://github.com/apache/cordova-fetch/issues/92#issuecomment-717498809


   I think I was able to overcome this by placing the cordova-ios git link in `dependencies` and not `devDependencies`. I'm failing to understand the logic here if it's not a bug...


----------------------------------------------------------------
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.

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


[GitHub] [cordova-fetch] QuentinFarizon commented on issue #92: cordova-android referencing git repo is changed to npm package version when performing a release build

Posted by GitBox <gi...@apache.org>.
QuentinFarizon commented on issue #92:
URL: https://github.com/apache/cordova-fetch/issues/92#issuecomment-898506948


   Same here, don't put cordova-android and cordova-ios in devDependencies, or they will not be taken into account.µ
   When running cordova build, cordova fetches another version from npm, silently.
   
   Definintely not what I was expecting when reading, and a bug according to https://github.com/apache/cordova-fetch/pull/65 mentioning "platforms and plugins"


-- 
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


[GitHub] [cordova-fetch] erisu commented on issue #92: cordova-android referencing git repo is changed to npm package version when performing a release build

Posted by GitBox <gi...@apache.org>.
erisu commented on issue #92:
URL: https://github.com/apache/cordova-fetch/issues/92#issuecomment-898650903


   Yeah, I remember, except I can not reproduce this at all.
   
   I showed you all the steps I took to try to reproduce it and its output but everything checked out correctly.


-- 
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


[GitHub] [cordova-fetch] HarelM commented on issue #92: cordova-android referencing git repo is changed to npm package version when performing a release build

Posted by GitBox <gi...@apache.org>.
HarelM commented on issue #92:
URL: https://github.com/apache/cordova-fetch/issues/92#issuecomment-898633298


   @erisu this is the bug we talked about in slack...


-- 
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


[GitHub] [cordova-fetch] HarelM commented on issue #92: cordova-android referencing git repo is changed to npm package version when performing a release build

Posted by GitBox <gi...@apache.org>.
HarelM commented on issue #92:
URL: https://github.com/apache/cordova-fetch/issues/92#issuecomment-717269733


   @ebhsgit were you able to find a work around for this? I have the same issue with cordova-ios git version...


----------------------------------------------------------------
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.

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


[GitHub] [cordova-fetch] breautek commented on issue #92: cordova-android referencing git repo is changed to npm package version when performing a release build

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #92:
URL: https://github.com/apache/cordova-fetch/issues/92#issuecomment-927405103


   I think this will be resolved by https://github.com/apache/cordova-lib/pull/880 which was just merged in. In a day or two, you can test it by installing `cordova@nightly`.


-- 
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


[GitHub] [cordova-fetch] HarelM commented on issue #92: cordova-android referencing git repo is changed to npm package version when performing a release build

Posted by GitBox <gi...@apache.org>.
HarelM commented on issue #92:
URL: https://github.com/apache/cordova-fetch/issues/92#issuecomment-927379488


   @erisu I'm having this issue again (this time with a regular version and not git repo version).
   See if you can reproduce it on your end:
   Clone `https://github.com/IsraelHikingMap/Site`
   ```
   cd IsraelHiking.Web
   npm install
   rm -rf platforms/ && rm -rf plugins/ (just in case...)
   npx cordova platform remove android
   npx cordova platform add android@10.1.1
   npx cordova prepare android
   ```
   this will output the following: Using cordova-fetch for cordova-android@^9.0.0.
   
   If I move the `"cordova-android": "^10.1.1"` in my package.json from `devDependencies` to `dependencies` `prepare` command will work with the right version.
   


-- 
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


[GitHub] [cordova-fetch] QuentinFarizon edited a comment on issue #92: cordova-android referencing git repo is changed to npm package version when performing a release build

Posted by GitBox <gi...@apache.org>.
QuentinFarizon edited a comment on issue #92:
URL: https://github.com/apache/cordova-fetch/issues/92#issuecomment-898506948


   Same here, don't put cordova-android and cordova-ios in devDependencies, or they will not be taken into account.µ
   When running cordova build, cordova fetches another version from npm, silently.
   
   Definintely a bug according to https://github.com/apache/cordova-fetch/pull/65 mentioning "platforms and plugins"


-- 
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