[TIMOB-28440] Android: Production builds crash if Node 14 is installed
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-05-11T10:41:49.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.0.0 |
Components | Android |
Labels | android, build, node, production |
Reporter | Michael Gangolf |
Assignee | Joshua Quick |
Created | 2021-05-06T18:49:17.000+0000 |
Updated | 2021-05-11T10:41:49.000+0000 |
Description
I know it is not supported officially but I'm giving nodejs 14.16.1 a try.
Building debug versions works fine. Just creating a store build will crash with:
[INFO] Analyzing module files
[INFO] Processing JavaScript files
[ERROR] TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object
at writeFile (fs.js:1436:5)
at go$writeFile (/home/user/.titanium/mobilesdk/linux/10.0.0/node_modules/graceful-fs/graceful-fs.js:139:14)
at Object.writeFile (/home/user/.titanium/mobilesdk/linux/10.0.0/node_modules/graceful-fs/graceful-fs.js:136:12)
at /home/user/.titanium/mobilesdk/linux/10.0.0/node_modules/universalify/index.js:10:14
at new Promise (<anonymous>)
at Object.writeFile (/home/user/.titanium/mobilesdk/linux/10.0.0/node_modules/universalify/index.js:7:14)
at AndroidBuilder.writeEnvironmentVariables (/home/user/.titanium/mobilesdk/linux/10.0.0/android/cli/commands/_build.js:2573:11)
at AndroidBuilder.copyResources (/home/user/.titanium/mobilesdk/linux/10.0.0/android/cli/commands/_build.js:2724:8)
at async AndroidBuilder.generateAppProject (/home/user/.titanium/mobilesdk/linux/10.0.0/android/cli/commands/_build.js:2261:2)
at async AndroidBuilder.run (/home/user/.titanium/mobilesdk/linux/10.0.0/android/cli/commands/_build.js:1545:3)
*Setup:*
* Fedora Linux 34
* node 14.16.1
* titanium 5.3.1
* ti sdk 10.0.0.RC
* alloy 1.16.0
This looks like a bug in our build script. https://github.com/appcelerator/titanium_mobile/blob/master/android/cli/commands/_build.js#L2571-L2580 We should change the following...
...to quote the empty curly braces like this...
PR (master): https://github.com/appcelerator/titanium_mobile/pull/12782
Thanks, working fine (y)