You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Sergey Grebnov (JIRA)" <ji...@apache.org> on 2014/06/26 13:37:24 UTC
[jira] [Created] (CB-7031) --usenpm option should place downloaded
package to util.libDirectory
Sergey Grebnov created CB-7031:
----------------------------------
Summary: --usenpm option should place downloaded package to util.libDirectory
Key: CB-7031
URL: https://issues.apache.org/jira/browse/CB-7031
Project: Apache Cordova
Issue Type: Bug
Components: CordovaLib
Reporter: Sergey Grebnov
Assignee: Sergey Grebnov
Currently cordova api relies on util.libDirectory to find proper location to platform package.
Using --usenpm flag makes it possible to fetch platform from npm. But it uses different folder to store downloaded package.
default lib directory as per util.libDirectory
c:\Users\Sergei\.cordova\lib\android
with --usenpm
c:\Users\Sergei\.cordova\lib\npm_cache\cordova-android
Due to this there are the following two issues:
1. Requirements check failed when adding new platform (if it is not cached)
cordova platform add wp8 --usenpm
CordovaError: Requirements check failed: The system cannot find the path specified.
This is because there is no util.libDirectory directory, package is located in different place.
2. Packages downloaded from npm can't be found by cordova so it downloads them again from git during prepare step, for example the following command will download android template twice
a) from npm during create step
b) from git during prepare step
cordova_dev platform add android --usenpm
npm http GET https://registry.npmjs.org/cordova-android/3.5.0
npm http 304 https://registry.npmjs.org/cordova-android/3.5.0
Creating android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: io.cordova.hellocordova
Name: HelloCordova
Android target: android-19
Copying template files...
...
Project successfully created.
__________url: *https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=snapshot;h=3.5.0;sf=tgz*
Downloading cordova library for android...
Download complete
--
This message was sent by Atlassian JIRA
(v6.2#6252)