Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18538] CLI: Fix incompatibilities with Node 0.12

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-02-13T08:04:17.000+0000
Affected Version/sRelease 3.4.1
Fix Version/sRelease 3.4.2
ComponentsCLI
Labelsn/a
ReporterTim Poulsen
AssigneeTim Poulsen
Created2015-02-09T16:43:45.000+0000
Updated2017-03-16T22:21:14.000+0000

Description

Node 0.12 has been released. The Titanium CLI is not compatible:
≫ ti setup
/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:185
        throw e;
              ^
ChildProcess.emit (events.js:110:17),maybeClose (child_process.js:1008:16),Socket.<anonymous> (child_process.js:1176:11),Socket.emit (events.js:107:17),Pipe.close (net.js:476:12)
To test: 1. Install Node 0.12 (or use a node version manager like n and set your current version to 0.12) 2. Run a ti command, such as ti setup check or ti info Perhaps related to async processing or spawning child processes. Enter ti setup choose option 2 (or type k), fails. Choose option 2 again, fails. Choose it a third time and it works; you get the setup check info. However, it doesn't detect my JDK and therefore my Android SDK info.

Comments

  1. Chris Barber 2015-02-09

    Smells like LiveView.
  2. Praveen Innamuri 2015-02-09

    When we try to get the info for iOS and Android, Node process either crashes or terminate with a error.
       titanium info -t ios -o json
       
  3. Tim Poulsen 2015-02-09

    Note: NodeJS 0.11.14 works fine, 0.11.15 fails with same errors as noted above for 0.12.0
  4. Tim Poulsen 2015-02-09

    Fix is in node-appc Fixes will need to be merged / applied in this order: node-appc PR: https://github.com/appcelerator/node-appc/pull/105 (merged) Titanium CLI PR: https://github.com/appcelerator/titanium/pull/188 (merged) node-ios-device PR: https://github.com/appcelerator/node-ios-device/pull/2 (ready for npm publish) ioslib PR: https://github.com/appcelerator/ioslib/pull/11 (ready to merge, npm publish) Titanium SDK PR: https://github.com/appcelerator/titanium_mobile/pull/6628 (ready to merge, waiting on npm publish of components)
  5. Tim Poulsen 2015-02-10

    Functional review steps: 1. Install Node 0.12 or use a node version manager such as https://www.npmjs.com/package/n 2. Install the Titanium CLI from master sudo npm install -g git://github.com/appcelerator/titanium.git 3. Build the SDK from the PR above, install, and set it as your default SDK 4. Download the ioslib and node-ios-device repos and copy their files to the matching locations within your installed copy (not your repo) of the SDK that you installed in the preceding step. 5. Run some Ti CLI commands: ti info, ti setup, ti sdk select, etc. 6. Due to TIMOB-18546 (LiveView not compatible with Node 0.12), either liveview rm clihook or edit your ~/.titanium/config.json file and remove the com.appcelerator.titanium.liveview entry from the hooks section to disable LiveView. 7. Build a project (make sure to set its tiapp.xml to 4.0.0).
  6. Tim Poulsen 2015-02-11

    Can you review even without the LiveView fix (in the related ticket)?
  7. Feon Sua Xin Miao 2015-02-13

    PR merged.
  8. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source