[ 
https://issues.apache.org/jira/browse/CB-10770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15231324#comment-15231324
 ] 

Jacob Weber edited comment on CB-10770 at 4/7/16 11:41 PM:
-----------------------------------------------------------

Would this explain why I'm seeing the following after running "cordova prepare" 
on a project with {{<engine name="ios" spec="~4.1.0" />}}? This started about 
two hours ago.

On one system it installs 4.1.1:
{code}
Restoring platform ios@~4.1.0 referenced on config.xml
Executing "before_platform_add"  hook for all plugins.
Adding ios project...
PlatformApi successfully found for platform ios
iOS project created with cordova-ios@4.1.1
{code}

And on another system it fails (although this doesn't stop the build from 
proceeding and generating errors further down the line):
{code}
Error: CordovaError: Failed to fetch platform ios@~4.1.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: version not found: cordova-ios@4.1.1
    at 
/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform.js:282:25
    at _rejected 
(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:797:24)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:823:30
    at Promise.when 
(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:1035:31)
    at Promise.promise.promiseDispatch 
(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:741:41)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:557:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
    at doNTCallback0 (node.js:417:9)
    at process._tickCallback (node.js:346:13)
{code}

Deleting the .cache.json file fixed the second problem. But in both cases it's 
trying to download 4.1.1 instead of 4.1.0, for some reason.


was (Author: jweber):
Would this explain why I'm seeing the following after running "cordova prepare" 
on a project with {{<engine name="ios" spec="~4.1.0" />}}?

On one system it installs 4.1.1:
{code}
Restoring platform ios@~4.1.0 referenced on config.xml
Executing "before_platform_add"  hook for all plugins.
Adding ios project...
PlatformApi successfully found for platform ios
iOS project created with cordova-ios@4.1.1
{code}

And on another system it fails (although this doesn't stop the build from 
proceeding and generating errors further down the line):
{code}
Error: CordovaError: Failed to fetch platform ios@~4.1.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: version not found: cordova-ios@4.1.1
    at 
/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform.js:282:25
    at _rejected 
(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:797:24)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:823:30
    at Promise.when 
(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:1035:31)
    at Promise.promise.promiseDispatch 
(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:741:41)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:557:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
    at doNTCallback0 (node.js:417:9)
    at process._tickCallback (node.js:346:13)
{code}

> cordova cli not adding platform via npm specifying new version before 24 
> hours of release
> -----------------------------------------------------------------------------------------
>
>                 Key: CB-10770
>                 URL: https://issues.apache.org/jira/browse/CB-10770
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 6.0.0
>         Environment: Mac
>            Reporter: Carlos Santana
>            Priority: Minor
>              Labels: CLI, triaged
>
> A new release of platform ios cordova-ios@4.1.0 is published to NPM
> User tries to install with $ cordova platform ios@4.1.0
> At the time of this command the npm cache information for the pacakge 
> cordova-ios in 
> ~/.cordova/lib/npm_cache/registry.npmjs.org/cordova-ios/.cache.json doesn't 
> have the information about 4.1.0 and the file is not older than 24 hours.
> cordova cli is configured with npm cache-min = 3600*24 (24 hours)
> If the file in the cache is not older than 24 hours npm will not check the 
> registry. and requested package cordova-ios@4.1.0 is not added to the cache.
> There is no err catch for this case in the cordova-lib [1]
> [1]: 
> https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/lazy_load.js#L158



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to