Details: If you build appc-cli with NPM 3.X and Node 6.10.3, then you will get "listener" argument must be a function error when creating a mobile project.
- This bug will appear when our (or ECD's) Jenkins build system start using NPM 3.X and Node 6.X to build appc-cli.
- To workaround the issue, you will need to use the --legacy-bundling flag: npm install --production --legacy-bundling
- On Jenkins, you will need to replace this line with the above command: https://github.com/appcelerator/jenkins_dsl/blob/master/jobs/appc_cli.groovy#L55
- It seems like the wrap function from lib/logger.js (https://github.com/appcelerator/appc-cli/blob/master/lib/logger.js#L99) is being destroyed when lib/core.js is processing node_modules/arrow/lib/plugin/new.js; specifically, here: https://github.com/appcelerator/appc-cli/blob/master/lib/core.js#L230
Steps to reproduce:
- Clone https://github.com/appcelerator/appc-cli
- From terminal, run the following commands in the appc-cli repo:
- After the tarball is created, create a folder in ~/.appcelerator/install and name it the version from the package.json file i.e. the version property.
- Untar the tarball and move the package folder to the folder created in the above step
- Run appc use <VER_YOU_PREV_CREATED>
- Run appc new --name monkey --id com.appc.monkey --type titanium --force --no-services -l trace
Actual: The following error will appear (also, see attached log for full stack trace):
Expected: You should be able to create mobile project regardless how app-cli is built.