[
https://issues.apache.org/jira/browse/CB-10770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15232429#comment-15232429
]
ASF GitHub Bot commented on CB-10770:
-------------------------------------
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/422#discussion_r59051171
--- Diff: cordova-lib/src/cordova/lazy_load.js ---
@@ -147,10 +147,7 @@ function cordova_npm(platform) {
// Returns a promise that resolves to directory containing the package.
function npm_cache_add(pkg) {
var npm_cache_dir = path.join(util.libDirectory, 'npm_cache');
- // 'cache-min' is the time in seconds npm considers the files fresh and
--- End diff --
How will it work if I remove the caching altogether - sounds like a design
change.
It does get a default `cache-min` of 10 seconds which if it is fine for
npm, should be fine for us:
https://github.com/npm/npm/blob/2a5977e0c65b244e92d848fcd56f2f80ba8cdf3b/lib/config/defaults.js#L125.
Their default scenario is quite similar to ours.
> 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 [email protected] is published to NPM
> User tries to install with $ cordova platform [email protected]
> 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 [email protected] 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: [email protected]
For additional commands, e-mail: [email protected]