Description
*This is not a regression, occurs using 5.5.1.GA components*
When building an Android module without
--build-only
the build process errors out with the below. This comes from the CLI attempting to [spawn ti](
https://github.com/appcelerator/titanium_mobile/blob/master/android/cli/commands/_buildModule.js#L1487), there is a check if spawning on Windows but it is never triggered as the statement does not return true as
.bat
is not present in the command
* This happens using ti cli and appc cli
* The spawning of ti may lead to issues when running appc cli as a user might not have the titanium cli installed
[DEBUG] Staging module project at C:\Users\ewan\AppData\Local\Temp\ti-android-module-build-11694-1752-g5y5p0
Error: spawn ti ENOENT
at exports._errnoException (util.js:907:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
---------------------------------------------
at ChildProcess.spawn (internal/child_process.js:281:13)
at exports.spawn (child_process.js:362:9)
at runTiCommand (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\android\cli\commands\_buildModule.js:1453:15)
at AndroidModuleBuilder.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\android\cli\commands\_buildModule.js:1487:4)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:718:13
at iterate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:262:13)
at async.forEachOfSeries.async.eachOfSeries (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:281:9)
at _parallel (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:717:9)
at Object.async.series (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:739:9)
---------------------------------------------
at AndroidModuleBuilder.tasks (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\android\cli\commands\_buildModule.js:1327:15)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:718:13
at iterate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:262:13)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:274:29
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:44:16
at Object.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:723:17)
at Object.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:167:37)
at CLI._fireHookCallback (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\lib\hook.js:269:12)
at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\lib\hook.js:248:10
---------------------------------------------
at Object.run (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\lib\subprocess.js:59:8)
at AndroidModuleBuilder.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\android\cli\commands\_buildModule.js:1277:22)
at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\lib\hook.js:256:13
at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:697:13
at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:52:16
at iterate (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:263:24)
at async.forEachOfSeries.async.eachOfSeries (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:284:9)
at _parallel (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:688:9)
at Object.async.series (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:710:9)
---------------------------------------------
at Object.setImmediate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:194:9)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:272:35
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:44:16
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:723:17
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:167:37
at AndroidModuleBuilder.assetFiles (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\android\cli\commands\_buildModule.js:1262:4)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:718:13
at iterate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:262:13)
at async.forEachOfSeries.async.eachOfSeries (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:281:9)
---------------------------------------------
at Object.setImmediate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:194:9)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:272:35
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:44:16
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:723:17
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:167:37
at AndroidModuleBuilder.verifyBuildArch (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\android\cli\commands\_buildModule.js:1235:2)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:718:13
at iterate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:262:13)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:274:29
---------------------------------------------
at Object.run (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\lib\subprocess.js:59:8)
at AndroidModuleBuilder.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\android\cli\commands\_buildModule.js:1176:19)
at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\lib\hook.js:256:13
at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:697:13
at C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:52:16
at iterate (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:263:24)
at async.forEachOfSeries.async.eachOfSeries (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:284:9)
at _parallel (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:688:9)
at Object.async.series (C:\Users\ewan\AppData\Roaming\npm\node_modules\titanium\node_modules\async\lib\async.js:710:9)
---------------------------------------------
at Object.setImmediate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:194:9)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:272:35
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:44:16
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:723:17
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:167:37
at AndroidModuleBuilder.ndkLocalBuild (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\android\cli\commands\_buildModule.js:1103:10)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:718:13
at iterate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:262:13)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:274:29
---------------------------------------------
at Object.run (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\lib\subprocess.js:59:8)
at AndroidModuleBuilder.tasks (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\android\cli\commands\_buildModule.js:1063:20)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:718:13
at Immediate.iterate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:262:13)
at processImmediate [as _immediateCallback] (timers.js:383:17)
---------------------------------------------
at Object.setImmediate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:194:9)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:272:35
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:44:16
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:723:17
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:167:37
at AndroidModuleBuilder.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\android\cli\commands\_buildModule.js:1049:4)
at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:718:13
at iterate (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:262:13)
at async.forEachOfSeries.async.eachOfSeries (C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20161002235150\node_modules\node-appc\node_modules\async\lib\async.js:281:9)
Steps to reproduce
Create an android module on Windows ti create --type module --name awesomOandroid --id com.awesomO.windows-p android --workspace-dir .
cd awesomOandroid \android
ti build -p android
Actual result
Module build fails
Expected result
Module build should not fail
Closing as a dupe of TIMOB-24912