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/15 09:04:24 UTC

[GitHub] [cordova-android] thibaudsowa opened a new issue #1092: Wrong dependencies version used when building app

thibaudsowa opened a new issue #1092:
URL: https://github.com/apache/cordova-android/issues/1092


   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   Build android app without error with `cordova android build`
   
   ### What does actually happen?
   
   As explained in #1040 (see [my comment](https://github.com/apache/cordova-android/issues/1040#issuecomment-704259289) and [the reponse](https://github.com/apache/cordova-android/issues/1040#issuecomment-704273816)) when we build app with `cordova build android` dependencies used can be in a wrong version.
   It append when the dependency (in my case `execa`) is used by other dependencies in different version.
   
   
   ## Information
   Here is my dependency tree for `execa`:
   ```
   $ npm ls execa
   myproject@0.0.1 C:\somepath
   +-- @angular-devkit/build-angular@0.13.9
   | `-- webpack-dev-server@3.1.14
   |   +-- internal-ip@3.0.1
   |   | `-- default-gateway@2.7.2
   |   |   `-- execa@0.10.0
   |   `-- yargs@12.0.2
   |     `-- os-locale@3.1.0
   |       `-- execa@1.0.0
   +-- @angular/compiler-cli@7.2.15
   | `-- yargs@9.0.1
   |   `-- os-locale@2.1.0
   |     `-- execa@0.7.0
   +-- @ionic/cli@6.11.11
   | `-- os-name@4.0.0
   |   `-- windows-release@4.0.0
   |     `-- execa@4.0.3
   +-- cordova-android@9.0.0
   | `-- execa@4.0.3
   `-- protractor@5.4.4
     `-- yargs@12.0.5
       `-- os-locale@3.1.0
         `-- execa@1.0.0
   ```
   
   When there is different version of a library, npm create sub `node_modules` directory:
   
   The version of `execa` in `/node_modules/execa` is 0.10.0
   The version of `execa` in `/node_modules/cordova-android/node_modules/execa` is 4.0.3
   
   When I execute `cordova build android` the `execa` used is the first one (the bad one...)
   I figured out by editing both lib file with some log.
   
   As @breautek explains in [his comment](https://github.com/apache/cordova-android/issues/1040#issuecomment-704273816), it is possible that the problem come from a NPM module resolution breaking due to project copied into `/platforms/android`.
   
   ### Command or Code
   `npm i -D execa@0.10.0`
   `npm i -D cordova-android@9.0.0`
   `cordova build android`
   
   
   
   ### Environment, Platform, Device
   Any environment, android platform
   
   
   
   ### Version information
   I'm on windows 10, cordova 10.0.0, cordova-android 9.0.0, npm 6.14.5, node 10.18.1
   
   
   
   ## Checklist
   - [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-android] erisu commented on issue #1092: Wrong dependencies version used when building app

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


   This should have been resolved in Cordova-Android 10. 
   
   @dpogue cordova-android JS API is no longer being copied into the `platforms/android` dir.


-- 
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-android] dpogue commented on issue #1092: Wrong dependencies version used when building app

Posted by GitBox <gi...@apache.org>.
dpogue commented on issue #1092:
URL: https://github.com/apache/cordova-android/issues/1092#issuecomment-709356392


   My thoughts on how best to fix this are to avoid copying the platform JS API stuff into the `platforms/android` folder, and instead to run it out of `node_modules/cordova-android` by using `require('cordova-android')`. The native project itself would still like in `platforms/android`.
   
   However, that's a major breaking change that would definitely break at least one documented workflow for using Cordova, so this probably requires a lot of discussion on the devlist.


----------------------------------------------------------------
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-android] erisu closed issue #1092: Wrong dependencies version used when building app

Posted by GitBox <gi...@apache.org>.
erisu closed issue #1092:
URL: https://github.com/apache/cordova-android/issues/1092


   


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