cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <>
Subject [jira] [Created] (CB-9559) Adding a plugin with caret in version results in an error
Date Wed, 26 Aug 2015 15:21:46 GMT
Shazron Abdullah created CB-9559:

             Summary: Adding a plugin with caret in version results in an error
                 Key: CB-9559
             Project: Apache Cordova
          Issue Type: Bug
          Components: CordovaLib
    Affects Versions: 5.2.0
         Environment: OS X 10.10.5 
cordova-cli 5.2.0
            Reporter: Shazron Abdullah
            Priority: Critical

cordova plugin add cordova-plugin-battery-status@^1.0.0
Fetching plugin "cordova-plugin-battery-status@^1.0.0" via npm
Failed to fetch plugin cordova-plugin-battery-status@^1.0.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: No compatible version found: cordova-plugin-battery-status@'">=1.0.0 <2.0.0"'
Valid install targets:

The plugin can be installed

The plugin cannot be installed.

Note in the error log, the version is expanded from:
@">=1.0.0 <2.0.0"

But, it appears the double quotes around the expanded version in the error log are *wrapped
with single quotes* now, resulting in the error.

The version is expanded using this *processPluginVersion* function:

>From this commit:

The fix appears to be not calling the function *processPluginVersion* and passing it to *npm
cache add* as is:

The purpose of this function is because we are using an older version of npm that may not
understand carets. Is this still truly the case? If not, we could get rid of this function
-- while still keeping CB-9147 fixed/resolved

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message