Problem
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)
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:
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
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.
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:
from the root directory of the cloned alloy repository. This will make things more clear on how to successfully run the sample apps.
[~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. ;-)
Sounds Good Tony, will do next time :)