Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25826

Android: Error requiring a file by relative path where module.exports is a falsey value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 7.1.0, Release 7.0.2, Release 7.2.0
    • Fix Version/s: Release 7.3.0
    • Component/s: Android
    • Labels:
    • Environment:

      Ti SDK: 7.0.2.GA, 7.1.0.v20180228160738, 7.2.0.v20180228155339

    • Sprint:
      2018 Sprint 05 SDK

      Description

      Description

      When a script that exports a falsey value undefined, null, false is required by a relative path ./foo the module will 'fail' to be found throwing the below error

      [ERROR] TiExceptionHandler: (main) [20,20] ----- Titanium Javascript Runtime Error -----
      [ERROR] TiExceptionHandler: (main) [0,20] - In ti:/module.js:303,2
      [ERROR] TiExceptionHandler: (main) [0,20] - Message: Uncaught Error: Requested module not found: ./foo
      [ERROR] TiExceptionHandler: (main) [0,20] - Source: 	throw new Error('Requested module not found: ' + request); // TODO Set 'code' property to 'MODULE_NOT_FOUND' to match Node?
      

      Steps to reproduce

      1. Download the attached app
      2. Build for android

      Actual

      The following is logged

      [INFO]  empty-double threw
      [INFO]  empty-single threw
      [INFO]  false threw
      [INFO]  nan threw
      [INFO]  null threw
      [INFO]  undefined threw
      [INFO]  zero threw
      

      Expected

      The following is logged

      [INFO]  empty-double worked
      [INFO]  empty-single worked
      [INFO]  false worked
      [INFO]  nan worked
      [INFO]  null worked
      [INFO]  undefined worked
      [INFO]  zero worked
      

        Attachments

          Activity

            People

            • Assignee:
              eharris Ewan Harris
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Christopher Williams
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6220
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code