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

Parity: Cannot require directory as done in NodeJS

    Details

    • Story Points:
      8
    • Sprint:
      2016 Sprint 12 SDK

      Description

      If you attempt to require a directory, NodeJS has well-defined behavior: https://nodejs.org/api/modules.html#modules_all_together

      Namely:

      • try to load dir/package.json and grab the main property, load the file pointed to by that.
      • try to load dir/index.js as JS
      • try to load dir/index.json as JSON

      Trying this on Android and iOS, it just throws a runtime error that the requested module was not found.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                cwilliams Christopher Williams
                Reviewer:
                Chee Kiat Ng (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code