cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-9935) On Node.js version 5.0.0 Cordova CLI build, run and emulate commands don't work.
Date Tue, 03 Nov 2015 00:45:27 GMT

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

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

GitHub user jasongin opened a pull request:

    https://github.com/apache/cordova-lib/pull/338

    CB-9935: Cordova CLI silently fails on node.js v5

    Cordova in a couple places was mis-using the Q.all() function from
    the Q promises library. That function expects an array (of values or
    promises), but Cordova was passing a single string parameter. The
    string was actually being reduced like an array. Previously that
    happened to work out OK: the result was an array of fulfilled
    single-character promises. But one line of code in Q that worked
    on node.js v4 now fails on node.js v5, where because of the bad
    parameter it ends up assigning a value to an index of the string:
        exception in cordova-lib\node_modules\q\q.js:1490
        >    promises[index] = value;
        TypeError: Cannot assign to read only property '0' of <string>
    It appears the newer version of V8 is a little more strict about
    assigning to a string index.
    
    The fix is simply to use Q() instead of Q.all() when the intention
    is to return a single fulfilled promise of type string.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jasongin/cordova-lib CB-9935

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-lib/pull/338.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #338
    
----
commit 0f1eb6135725090af0af4fc82af29ca62645ed75
Author: Jason Ginchereau <jasongin@microsoft.com>
Date:   2015-11-03T00:29:55Z

    CB-9935: Cordova CLI silently fails on node.js v5
    
    Cordova in a couple places was mis-using the Q.all() function from
    the Q promises library. That function expects an array (of values or
    promises), but Cordova was passing a single string parameter. The
    string was actually being reduced like an array. Previously that
    happened to work out OK: the result was an array of fulfilled
    single-character promises. But one line of code in Q that worked
    on node.js v4 now fails on node.js v5, where because of the bad
    parameter it ends up assigning a value to an index of the string:
        exception in cordova-lib\node_modules\q\q.js:1490
        >    promises[index] = value;
        TypeError: Cannot assign to read only property '0' of <string>
    It appears the newer version of V8 is a little more strict about
    assigning to a string index.
    
    The fix is simply to use Q() instead of Q.all() when the intention
    is to return a single fulfilled promise of type string.

----


> On Node.js version 5.0.0 Cordova CLI build, run and emulate commands don't work.
> --------------------------------------------------------------------------------
>
>                 Key: CB-9935
>                 URL: https://issues.apache.org/jira/browse/CB-9935
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 5.3.2
>         Environment: Cordova CLI: 5.3.3
> Gulp version:  CLI version 3.9.0
> Gulp local:   Local version 3.9.0
> Ionic Version: 1.1.0
> Ionic CLI Version: 1.7.7
> Ionic App Lib Version: 0.6.3
> ios-deploy version: 1.8.2
> ios-sim version: 5.0.3
> OS: Mac OS X El Capitan
> Node Version: v5.0.0
> Xcode version: Xcode 7.1 Build version 7B91b
>            Reporter: U─čur Erkan
>            Assignee: Jason Ginchereau
>
>  Cordova CLI with Node.js 5.0.0 build, run and emulate commands don't work. There isn't
any output even verbose mode. I can't find any debug output, so sorry about lack of information.
> Working workaround is node version switching, i'm using the n version manager. https://github.com/tj/n

> !https://i.imgur.com/1HG5ndp.png!
> {color:red}
> *It's affect Cordova CLI 5.3.3 version*
> 5.3.3 is latest version on NPM https://www.npmjs.com/package/cordova
> {color}



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

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


Mime
View raw message