Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cordovaDependencies check fails if installed dependency has a matching pre-release version #790

Open
3 tasks done
janpio opened this issue Jul 15, 2019 · 1 comment
Open
3 tasks done
Labels

Comments

@janpio
Copy link
Member

janpio commented Jul 15, 2019

Bug Report

Problem

cordova plugin add ... errors and installs older plugin version even though the requirements of the plugin are met just fine.

What is expected to happen?

I can install the plugin.

What does actually happen?

E:\Projects\throwaway
λ cordova create cordovaLibRepro
Creating a new cordova project.

E:\Projects\throwaway
λ cd cordovaLibRepro\

E:\Projects\throwaway\cordovaLibRepro  (helloworld@1.0.0)
λ cordova platform add https://github.com/apache/cordova-windows
Using cordova-fetch for https://github.com/apache/cordova-windows
Warning: using prerelease platform windows@7.1.0-dev.
Use 'cordova platform add windows@latest' to add the latest published version instead.
Adding windows project...
Creating Cordova Windows Project:
        Path: platforms\windows
        Namespace: io.cordova.hellocordova
        Name: HelloCordova
Windows project created with cordova-windows@7.1.0-dev
Installing "cordova-plugin-whitelist" for windows

E:\Projects\throwaway\cordovaLibRepro  (helloworld@1.0.0)
λ cordova plugin add cordova-plugin-splashscreen
Unmet project requirements for latest version of cordova-plugin-splashscreen:
    cordova-windows (7.1.0-dev in project, >=4.4.0 required)
Fetching highest version of cordova-plugin-splashscreen that this project supports: 3.2.2 (latest is 5.0.3)
Installing "cordova-plugin-splashscreen" for windows
Adding cordova-plugin-splashscreen to package.json

The -dev suffix of cordova-windows master seems to confuse the comparison logic, but it shouldn't as this is valid semver for a prerelease version: https://semver.org/#spec-item-9

Information

Relevant bit of the plugin package.json:
https://github.com/apache/cordova-plugin-splashscreen/blob/be85a1b14e69696b6c0355c754181c8d57d0837f/package.json#L30-L44

Version information

9.0.0 (cordova-lib@9.0.1)

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@janpio janpio changed the title Unmet project requirements for latest version of ... although requirements are met (when using paltform from master) Unmet project requirements for latest version of ... although requirements are met (when using -dev platform from master) Jul 15, 2019
@janpio janpio changed the title Unmet project requirements for latest version of ... although requirements are met (when using -dev platform from master) Unmet project requirements for latest version of ... although requirements are met (when using -dev platform from master) Jul 15, 2019
@janpio
Copy link
Member Author

janpio commented Jul 15, 2019

Workaround:
Install the current plugin version explicitly: cordova plugin add cordova-plugin-splashscreen@5.0.3

@janpio janpio added the bug label Jul 15, 2019
@raphinesse raphinesse changed the title Unmet project requirements for latest version of ... although requirements are met (when using -dev platform from master) cordovaDependencies check fails if installed dependency has a matching pre-release version Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant