Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1963] can't run test apps in alloy git repository

GitHub Issuen/a
ResolutionWon't Fix
Resolution Date2013-02-26T17:28:12.000+0000
Affected Version/sn/a
Fix Version/sn/a
Labelsalloy, jake, modules
ReporterMarco Seguri
AssigneeMauro Parra-Miranda



Can't run test apps in alloy git repository. Code under [*Running Sample Test Apps*](https://github.com/appcelerator/alloy/#running-sample-test-apps) does not work.

Test case

install jake: sudo npm install -g jake

Get into the root directory of the cloned alloy repository.

Find a test app in test/apps folder you want to run. For example, basics/simple or models/todo.

Run jake: jake app:run dir=basics/simple

$ jake app:run dir=basics/simple --trace
jake aborted.
Error: Cannot find module 'colors'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/<path>/alloy/Alloy/utils.js:5:11)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)


  1. Tony Lukasavage 2013-02-26

    You need to install the other dependencies of "jake", which includes "colors" (as noted in the error message) and you will likely get prompted for other dependencies as well. All can installed as such:
       sudo npm install -g NAME_OF_MODULE
  2. Marco Seguri 2013-02-26

    I think it's not clear that 'colors' is a module to be installed from npm, cause the error seems coming from Alloy/utils.js Can you improve alloy documentation on github? Thanks
  3. Tony Lukasavage 2013-02-26

    I can't improve the documentation there. That is an exception error produced by nodejs, not alloy itself. It tells you it can't find a nodejs module, which would happen in any nodejs app missing a dependency, so i'm not sure what else it could really tell you.
  4. Americo Savinon 2013-08-18

    Probably a good addition to the docs in github on how to run the test apps (https://github.com/appcelerator/alloy#running-sample-test-apps), maybe to be included inside #2, is to run:
    npm install 
    from the root directory of the cloned alloy repository. This will make things more clear on how to successfully run the sample apps.
  5. Tony Lukasavage 2013-08-19

    [~americos] good catch! I updated the README.md to be more clear, based on your suggestion. Next time just submit a pull request and have yourself immortalized forever as an Alloy contributor. ;-)
  6. Americo Savinon 2013-08-19

    Sounds Good Tony, will do next time :)

JSON Source