cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (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 01:57:27 GMT

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

ASF subversion and git services commented on CB-9935:
-----------------------------------------------------

Commit 0e052f2ff86f303209bce4ee2636914217f3717f in cordova-lib's branch refs/heads/5.4.x from
[~jasongin]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=0e052f2 ]

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