This bug is related to
ALOY-920, which introduced a fix for the specific case of should.js.
When building an Alloy project containg a library directory named with a .js suffix, the compiler fails:
The getJsFiles() Alloy compiler method filters which files have to be optimized, as in https://github.com/appcelerator/alloy/blob/master/Alloy/commands/compile/index.js#L1017
This method fails to exclude items which are directories ending with .js, and uglifyjs.parse() then throws an error.
A pull request has been submitted at https://github.com/appcelerator/alloy/pull/683