Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1921] TypeError in alloy compile (node 0.10)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2013-03-19T16:24:01.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy
Labelsn/a
ReporterPaul Mietz Egli
AssigneeMauro Parra-Miranda
Created2013-03-19T16:11:18.000+0000
Updated2016-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);

Comments

  1. Paul Mietz Egli 2013-03-19

    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.
  2. Tony Lukasavage 2013-03-19

    Already resolved in ALOY-550
  3. Mauro Parra-Miranda 2013-11-24

    DUP issue.

JSON Source