Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18629] CLI: Warn if using an unsupported Node version

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-03-03T22:56:55.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.4.2
ComponentsCLI
Labelsn/a
ReporterIngo Muschenetz
AssigneeChris Barber
Created2015-03-02T19:54:04.000+0000
Updated2015-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

Check the root package.son file for the node range supported

Compare that against the node version installed.

If the installed range lies outside the supported range, print a *HIGHLY VISIBLE WARNING* that this node version may not work as expected and encourage them to upgrade (if older) or downgrade (if newer) to a supported node version.

Comments

  1. Chris Barber 2015-03-02

    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
  2. Chris Barber 2015-03-02

    To test, install Node.js 0.12.0, then run:
       ti sdk install 3.5.0.GA
       ti sdk install -b 3_5_X -d
       
       

    should work

    ti build -p ios

    should show error message

    ti build -p ios --sdk 3.5.0.GA
    Install Node.js 0.10.36 (or whatever), then run the build commands above again.
  3. Chris Barber 2015-03-03

    [~ingo] That's easy enough. I'll get an update today.
  4. Chris Barber 2015-03-03

    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:
       ti build -p ios --config "{cli:{hideNodejsWarning:true}}"
       
  5. Ingo Muschenetz 2015-03-03

    Could you test this by following the steps here: TIMOB-18632?
  6. Praveen Innamuri 2015-03-03

    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.
  7. Eric Wieber 2015-03-05

    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.

JSON Source