Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27784] Android: Running "clean" on a module will error if "libs" folder does not exist

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2020-04-02T13:13:22.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.0.1
ComponentsAndroid
Labelsandroid, build, clean, module
ReporterJoshua Quick
AssigneeJoshua Quick
Created2020-02-29T03:14:06.000+0000
Updated2020-04-02T13:13:22.000+0000

Description

*Summary:* When developing a module, running the appc ti clean command on a module directory that is missing a "libs" folder will throw an error. This is a minor issue that you can safely ignore. The clean command will successfully delete the "build" and "dist" folders first if they exist, which is what's most important. *Steps to reproduce:*

Download a zip of the [ti.imagefactory](https://github.com/appcelerator-modules/ti.imagefactory) repo source.

Unzip the above.

Open the Terminal.

CD to folder: ./ti.imagefactory/android

Enter: appc ti clean

Notice it errors with below message.

Enter: appc run -p android --build-only

Wait for the build to finish.

Enter: appc ti clean

Notice it errors with below message.

*Result:*
[ERROR]  :Failed to run command "clean" 
[ERROR]  :Error: ENOENT: no such file or directory, scandir '/Users/<UserName>/Development/modules/ti.imagefactory/android/libs'
*Reason:* We're missing a "libs" directory existence check below. [titanium_mobile/android/cli/commands/_cleanModule.js](https://github.com/appcelerator/titanium_mobile/blob/73c73b6d352ada5918ec30e008c95bf12d7ed633/android/cli/commands/_cleanModule.js#L38)

Comments

  1. Joshua Quick 2020-02-29

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/11508 PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11509
  2. Satyam Sekhri 2020-03-20

    FR Passed on master and 9_0_X branch. Waiting for Jenkins build on master.
  3. Christopher Williams 2020-03-24

    merged to master
  4. Saumya Rai 2020-04-02

    Closing this bug, it works fine. Verified with *Appcelerator*- 8.0.0 *Ti Sdk* : 9.1.0.v20200331065959 and 9.1.0.v20200330110941

JSON Source