Test app attached
1. go to
app/lib
and run
npm install
2. build app
The app will fail with
Alloy Compiler Failed
error
Run in trace mode shows an error however if you delete the folder app/lib/node_modules/bl/test, rebuild the App and it will build and launch in the simulato successfully.
The error:
{{[DEBUG] if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER)
[DEBUG] return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests')
[DEBUG] if (!/v0\.10/.test(process.version))
[DEBUG] return console.log('Not Node v0.10.x, not running sauce tests')
[DEBUG] require('./sauce.js')
[DEBUG]
[DEBUG] /Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/Alloy/commands/compile/sourceMapper.js:212
[DEBUG] throw e;
[DEBUG] ^
[DEBUG] SyntaxError: 'return' outside of function (4:2)
[DEBUG] at Parser.raise (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:6325:17)
[DEBUG] at Parser.parseReturnStatement (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:10190:12)
[DEBUG] at Parser.parseStatementContent (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:9877:21)
[DEBUG] at Parser.parseStatement (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:9829:17)
[DEBUG] at Parser.parseIfStatement (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:10183:28)
[DEBUG] at Parser.parseStatementContent (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:9874:21)
[DEBUG] at Parser.parseStatement (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:9829:17)
[DEBUG] at Parser.parseBlockOrModuleBlockBody (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:10405:25)
[DEBUG] at Parser.parseBlockBody (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:10392:10)
[DEBUG] at Parser.parseTopLevel (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:9758:10)
[DEBUG] at Parser.parse (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:11270:17)
[DEBUG] at Object.parse (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/@babel/parser/lib/index.js:11306:38)
[DEBUG] at Object.exports.generateSourceMap (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/Alloy/commands/compile/sourceMapper.js:206:17)
[DEBUG] at /Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/Alloy/utils.js:292:17
[DEBUG] at arrayEach (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/lodash/lodash.js:516:11)
[DEBUG] at Function.forEach (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/lodash/lodash.js:9342:14)
[DEBUG] at Object.exports.updateFiles (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/Alloy/utils.js:249:4)
[DEBUG] at updateFilesWithBuildLog (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/Alloy/commands/compile/index.js:1114:24)
[DEBUG] at /Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/Alloy/commands/compile/index.js:263:3
[DEBUG] at arrayEach (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/lodash/lodash.js:516:11)
[DEBUG] at Function.forEach (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/node_modules/lodash/lodash.js:9342:14)
[DEBUG] at module.exports (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/Alloy/commands/compile/index.js:262:4)
[DEBUG] at Object.
(/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/Alloy/alloy.js:112:46)
[DEBUG] at Module._compile (module.js:649:30)
[DEBUG] at Object.Module._extensions..js (module.js:660:10)
[DEBUG] at Module.load (module.js:561:32)
[DEBUG] at tryModuleLoad (module.js:501:12)
[DEBUG] at Function.Module._load (module.js:493:3)
[DEBUG] at Module.require (module.js:593:17)
[DEBUG] at require (internal/module.js:11:18)
[DEBUG] at Object. (/Users/jkneen/.nvm/versions/node/v9.9.0/lib/node_modules/alloy/bin/alloy:3:1)
[DEBUG] at Module._compile (module.js:649:30)
[DEBUG] at Object.Module._extensions..js (module.js:660:10)
[DEBUG] at Module.load (module.js:561:32)
[DEBUG] at tryModuleLoad (module.js:501:12)
[DEBUG] at Function.Module._load (module.js:493:3)
[DEBUG] at Function.Module.runMain (module.js:690:10)
[DEBUG] at startup (bootstrap_node.js:194:16)
[DEBUG] at bootstrap_node.js:666:3
[ERROR] Alloy compiler failed}}
Created PR: https://github.com/appcelerator/alloy/pull/938
*Closing ticket.* Fix verified in CLI Version
"NPM":"4.2.15-1","CLI":"7.1.2-7"
. Tested using the instructions above and no longer get the above error. *Test Environment*