[AC-1921] TypeError in alloy compile (node 0.10)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-03-19T16:24:01.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | n/a |
Reporter | Paul Mietz Egli |
Assignee | Mauro Parra-Miranda |
Created | 2013-03-19T16:11:18.000+0000 |
Updated | 2016-03-08T07:40:50.000+0000 |
Description
According to the [Alloy Troubleshooting Doc](http://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Debugging_and_Troubleshooting-section-34637808_AlloyDebuggingandTroubleshooting-%5BERROR%5D+Noapp.jsfound.+Ensuretheapp.jsfileexistsinyourproject%27sResourcesdirectory.), we should run
alloy compile --config platform=<platform>
when the contents of our Resources directory are modified or the directory is removed. I ran this command in an older project and got the following error:
path.js:360
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at loadGlobalStyles (/usr/local/Cellar/node/0.10.0/lib/node_modules/alloy/Alloy/commands/compile/index.js:572:25)
...
The problem is that the "theme" parameter to loadGlobalStyles()
is undefined. To work around this issue, I modified line 571 of commands/compile/index.js
to use an empty string when this happens:
var themeGlobal = path.join(appPath,'themes',theme||'',CONST.DIR.STYLE,CONST.GLOBAL_STYLE);
Error does not occur on node 0.8.22. Feel free to close the bug if you like or leave it open as a reminder.
Already resolved in ALOY-550
DUP issue.