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

CLI: node_modules in project root should be handled properly

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 10.0.0
    • Component/s: CLI, iOS
    • Labels:
      None
    • Story Points:
      13
    • Sprint:
      2020 Sprint 2, 2020 Sprint 3, 2020 Sprint 13, 2020 Sprint 14, 2020 Sprint 15, 2020 Sprint 16, 2020 Sprint 17, 2020 Sprint 18, 2020 Sprint 19, 2020 Sprint 20, 2020 Sprint 21, 2020 Sprint 22, 2020 Sprint 23, 2020 Sprint 24, 2020 Sprint 25, 2020 Sprint 26, 2021 Sprint 5, 2021 Sprint 6, 2021 Sprint 7, 2021 Sprint 8

      Description

      I tried using ReduxJS in Titanium, but it fails because we do not look-up node_modules correctly. It is installed to node_modules/redux/lib/redux.js, but Titanium does not look there. This seems to be an issue for many many other Node.js modules as well. A workaround is to copy the library to app/lib (Alloy) or Resources (Classic), but that's not how it's handled in modern JS environments, so this should not be the normal workflow.

      To reproduce:
      1. Create a new Ti app
      2. Run npm init
      3. Run npm i redux --save
      4. Add import { createStore } from 'redux' to your app.js / index.js (ES6 enabled)
      5. Run your app

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                hknoechel Hans Knöchel
                Reviewer:
                Gary Mathews
              • Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration