[TIMOB-18629] CLI: Warn if using an unsupported Node version
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-03-03T22:56:55.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.4.2 |
Components | CLI |
Labels | n/a |
Reporter | Ingo Muschenetz |
Assignee | Chris Barber |
Created | 2015-03-02T19:54:04.000+0000 |
Updated | 2015-03-05T19:35:07.000+0000 |
Description
Currently, if you upgrade to Node 0.12 and attempt to build with a pre-3.5.1 SDK, it will fail. This is expected by us, but confusing to the end user.
To fix, we will warn the user that they should downgrade (or upgrade) to a supported node version
node-appc v0.2.25 https://github.com/appcelerator/node-appc/pull/107 Titanium CLI master pull request: https://github.com/appcelerator/titanium/pull/194 Titanium CLI 3_5_X pull request: https://github.com/appcelerator/titanium/pull/195 Titanium CLI 3_4_X pull request: https://github.com/appcelerator/titanium/pull/198
To test, install Node.js 0.12.0, then run:
Install Node.js 0.10.36 (or whatever), then run the build commands above again.
[~ingo] That's easy enough. I'll get an update today.
Titanium CLI master PR: https://github.com/appcelerator/titanium/pull/199 Titanium CLI 3_5_X PR: https://github.com/appcelerator/titanium/pull/201 Titanium CLI 3_4_X PR: https://github.com/appcelerator/titanium/pull/200 To test fully test this, you need to use a Node.js version from the future. Since there's nothing newer than 0.12, this is going to be impossible. You will need to edit the titanium.js and fake the process.version. Also, this PR introduces a new CLI config setting:
cli.hideNodejsWarning
. It defaults to false. You can test this by running:Could you test this by following the steps here: TIMOB-18632?
The only problem I noticed is with the below configuration - - Node v0.12 is installed. - Selected Titanium SDK is 3.5.0.GA - Create a Titanium app with SDK set to 3.5.1.x and build the command using `
ti build -p ios
` The above command will end abruptly while it tries to load node-ios-device libraries without any errors/warnings. However, if we we run the same command with the --sdk parameter, then it runs without any errors as expected.Verified fixed, using: Titanium SDK 3.5.1.v20150305100816 & 3.5.0.GA CLI 3.4.2-rc4 Warnings about node support are correctly shown for the indicated commands.