You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/09/03 08:28:00 UTC

[jira] [Commented] (CB-14191) Project does not include the specified platform: android error.

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

ASF GitHub Bot commented on CB-14191:
-------------------------------------

raphinesse closed pull request #10: CB-14191 (android) Fix bug with module requiring
URL: https://github.com/apache/cordova-serve/pull/10
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/util.js b/src/util.js
index 57cdef2..fdb92fa 100644
--- a/src/util.js
+++ b/src/util.js
@@ -78,7 +78,7 @@ function getPlatformWwwRoot (cordovaProjectRoot, platformName) {
     }
 
     try {
-        var Api = require(path.join(cordovaProjectRoot, 'platforms', platformName, 'cordova/api'));
+        var Api = require(path.join(cordovaProjectRoot, 'platforms', platformName, 'cordova/Api'));
         return new Api().locations.www;
     } catch (e) {
         // Fallback on hardcoded paths if platform api not found


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Project does not include the specified platform: android error.
> ---------------------------------------------------------------
>
>                 Key: CB-14191
>                 URL: https://issues.apache.org/jira/browse/CB-14191
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-serve
>    Affects Versions: cordova-serve@2.0.1
>         Environment: OS: Ubuntu 16.04
> Cordova CLI: 8.0.0
>  
>            Reporter: Ruslan Bikkinin
>            Priority: Major
>
> Code on this this line: [https://github.com/apache/cordova-serve/blob/master/src/util.js#L81] is trying to require `cordova/api` module but actual filename generated by cordova is Api.js and no file is being found on case-sensitive file systems like ext4. It leads to _Project does not include the specified platform: android_ error.
> To reproduce issue please do the following:
>  
>  # Make sure that you are using case-sensitive file system
>  # Clone demo repo: https://github.com/ruslan-bikkinin/cordova-serve-repro
>  # cd cordova-serve-repro
>  # npm i
>  # node serve
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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