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: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CLI, iOS
    • Labels:
      None

      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:
                eharris Ewan Harris
                Reporter:
                hknoechel Hans Knöchel
              • Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

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

                    Git Source Code