Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26351] iOS CLI (Babel): Cannot read property 'isIfStatement' of null

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2018-09-05T16:42:10.000+0000
Affected Version/sRelease 7.4.0, Release 7.3.0
Fix Version/sRelease 7.4.0
ComponentsCLI, iOS
Labelsn/a
ReporterHans Knöchel
AssigneeEwan Harris
Created2018-09-02T15:03:29.000+0000
Updated2018-09-05T18:53:39.000+0000

Description

When using SDK 7.4.0, the following error occurs when building kitchensink-v2 to a device
[ERROR] ~/kitchensink-v2/Resources/iphone/logger.js: Cannot read property 'isIfStatement' of null
It looks like a [known Babel issue](https://github.com/babel/minify/issues/850), but is there a way around it?

Steps to reproduce

Get the latest kitchensink-v2 https://github.com/appcelerator/kitchensink-v2

Build for iOS device

Comments

  1. Ewan Harris 2018-09-03

    [~hknoechel] You should be able to add --skip-js-minify to prevent this. Is it only 7.4.0 onwards? We haven't bumped the minify version for a while AFAIK
  2. Hans Knöchel 2018-09-03

    Only noticed in 7.4.0 so far, yep. But trying it right now, it works again. But I bumped by Node version from 8 to 9 yesterday, maybe that helped.
  3. Ewan Harris 2018-09-03

    I'm hitting this in 7.3.0 also. Looks to be because we moved from babel-preset-babili to babel-preset-minify. We can take the prerelease version of babel-preset-minify with the fix or we roll back and try and find a version without the bug. Personally I vote for the prerelease because babel-preset-minify has seemed rather unstable since we've been using it so I think we need to be proactive in testing the betas etc.
  4. Ewan Harris 2018-09-05

    PR: https://github.com/appcelerator/node-titanium-sdk/pull/45 I went for the "safer" option of rolling back to 0.3.0 given that I think this should land in 7.4.0
  5. Ewan Harris 2018-09-05

    Master: https://github.com/appcelerator/titanium_mobile/pull/10308 7_4_X: https://github.com/appcelerator/titanium_mobile/pull/10309
  6. Keerthi Mahalingam 2018-09-05

    Verified the fix on 7.4.0.v20180905090826. Kitchensink app built successfully. Closing.
       Operating System
         Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
         # CPUs                      = 8
         Memory                      = 17179869184
       
       Node.js
         Node.js Version             = 8.9.1
         npm Version                 = 5.5.1
       
       Titanium CLI
         CLI Version                 = 5.1.1
       
       Titanium SDK
       Sdk Version               = 7.4.0.v20180905090826
       
       Device
       iphone 6s with ios 10
       

JSON Source