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

Windows: require call in node_modules directory fails to find module

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 6.0.3
    • Fix Version/s: Release 6.2.0
    • Component/s: Windows
    • Labels:
      None
    • Environment:

      Ti SDK: 6.0.3.GA

      Description

      Description

      Carrying over from, TIMOB-24642. The demo app at https://www.dropbox.com/s/m4wy91x92gxw63m/demo.zip?dl=1 when built for windows will throw the error below, it seems to be unable to traverse back through to the top level node_modules to find bar

      -- Start application log -----------------------------------------------------
      [ERROR] Application Error: {
      [ERROR]   "line": 2,
      [ERROR]   "column": 10,
      [ERROR]   "message": "require: Error while require(/app) require: Error while require(foo) require: Error while require(./lib/foo) require: Could not load module bar",
      [ERROR]   "native_stack": [
      [ERROR]     "JSExportClass<class Titanium::GlobalObject>::CallNamedFunction"
      [ERROR]   ]
      [ERROR] }
      -- End application log -------------------------------------------------------
      

      Steps to reproduce
      1. Download the above app
      2. Build it for Windows
      Actual

      Error is thrown

      Expected

      No error thrown, console should log the below

      [INFO] boz index.js loaded
      [INFO] boo boo.js loaded
      [INFO] baz index.js loaded
      [INFO] bar bar.js loaded
      [INFO] foo lib/foo.js loaded
      [INFO] foo index.js loaded

        Attachments

          Activity

            People

            • Assignee:
              eharris Ewan Harris
              Reporter:
              eharris Ewan Harris
              Tester:
              Josh Longton
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code