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 2021/01/05 11:22:31 UTC

[GitHub] [cordova-lib] zoltan-mihalyi opened a new issue #866: Wrong platform version is detected when dependencies and devDependencies are both present

zoltan-mihalyi opened a new issue #866:
URL: https://github.com/apache/cordova-lib/issues/866


   # Bug Report
   
   ## Problem
   When dependencies and devDependencies are both present, running `cordova prepare` installs the wrong platform version.
   
   ### What is expected to happen?
   `Using cordova-fetch for cordova-electron@2.0.0` is printed
   
   
   ### What does actually happen?
   `Using cordova-fetch for cordova-electron@1.0.0` is printed
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   ### Environment, Platform, Device
   the relevant part of my package.json:
   
   ```json
   {
     "devDependencies": {
       "cordova-electron": "2.0.0"
     },
     "dependencies": {
       "cordova-plugin-googleplus": "8.5.1"
     },
     "cordova": {
       "plugins": {
         "cordova-plugin-googleplus": {}
       },
       "platforms": [
         "electron"
       ]
     }
   }
   ```
   
   
   ### Solution
   
   I managed to find the problem in this line:
   https://github.com/apache/cordova-lib/blob/master/src/cordova/platform/addHelper.js#L102
   
   If "dependencies" exists, the code skips the devDependencies.
   
   ### Version information
   cordova-lib@10.0.0
   <!-- 
   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.
   -->
   
   
   
   ## 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-lib] raphinesse closed issue #866: Wrong platform version is detected when dependencies and devDependencies are both present

Posted by GitBox <gi...@apache.org>.
raphinesse closed issue #866:
URL: https://github.com/apache/cordova-lib/issues/866


   


-- 
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-lib] lirichard commented on issue #866: Wrong platform version is detected when dependencies and devDependencies are both present

Posted by GitBox <gi...@apache.org>.
lirichard commented on issue #866:
URL: https://github.com/apache/cordova-lib/issues/866#issuecomment-916532228


   @aidanas proposed a fix in PR #874. I forked his fork and contributed a unit test as well for completeness: PR aidanas/cordova-lib#1.
   
   See also previous closed issue which partially fixed the problem, and a follow-up comment which likely is about this same issue: https://github.com/apache/cordova-lib/issues/832#issuecomment-901946362.


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