[TIMOB-18538] CLI: Fix incompatibilities with Node 0.12
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-02-13T08:04:17.000+0000 |
Affected Version/s | Release 3.4.1 |
Fix Version/s | Release 3.4.2 |
Components | CLI |
Labels | n/a |
Reporter | Tim Poulsen |
Assignee | Tim Poulsen |
Created | 2015-02-09T16:43:45.000+0000 |
Updated | 2017-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.
Smells like LiveView.
When we try to get the info for iOS and Android, Node process either crashes or terminate with a error.
Note: NodeJS 0.11.14 works fine, 0.11.15 fails with same errors as noted above for 0.12.0
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)
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), eitherliveview 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).Can you review even without the LiveView fix (in the related ticket)?
PR merged.
Closing ticket as fixed.