Skip to content

bug: App no longer transferred to device with "ionic cap run android -l --external" when using angular 17 and esbuild. #5061

Description

@WillooWisp

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

App is not transferred to device for live-reload after upgrading to angular 17 and esbuild.

Expected Behavior

I expect to see "capacitor.cmd run android --no-sync --target " in console, but it is never executed.

Steps to Reproduce

  1. Upgrade a sample app to angular 17+.
  2. Change to utilize esbuild through @angular-devkit/build-angular:application in angular.json.
  3. Run "ionic cap run android -l --external", which just starts the dev server, but never deploys the apk.

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 7.1.5 (C:\Users\joel\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 7.5.4
@angular-devkit/build-angular : 16.2.10
@angular-devkit/schematics : 16.2.10
@angular/cli : 16.2.10
@ionic/angular-toolkit : 10.0.0

Capacitor:

Capacitor CLI : 5.5.1
@capacitor/android : 5.5.1
@capacitor/core : 5.5.1
@capacitor/ios : 5.5.1

Utility:

cordova-res : not installed globally
native-run : 1.7.4

System:

NodeJS : v20.9.0 (C:\Program Files\nodejs\node.exe)
npm : 10.1.0
OS : Windows 10

Additional Information

Before angular 17 and esbuild...

[ng] √ Compiled successfully.

[INFO] Development server running!

       Local: http://localhost:8100
       External: http://172.24.64.1:8100, http://192.168.1.36:8100, http://192.168.32.66:8100, http://172.18.224.1:8100

       Use Ctrl+C to quit this process

> capacitor.cmd run android --no-sync --target R5CW143GQFX
[capacitor] √ Running Gradle build in 97.27s
[capacitor] √ Deploying app-debug.apk to R5CW143GQFX in 18.53s

[INFO] App deployed to device!

       Development server will continue running until manually stopped.

       Use Ctrl+C to quit this process

After angular 17 and esbuild...

[ng] Application bundle generation complete. [12.499 seconds]
[ng] Watch mode enabled. Watching for file changes...
[ng]   ➜  Local:   http://localhost:8100/
[ng]   ➜  Network: http://172.24.64.1:8100/
[ng]   ➜  Network: http://169.254.8.211:8100/
[ng]   ➜  Network: http://192.168.1.36:8100/
[ng]   ➜  Network: http://192.168.32.66:8100/
[ng]   ➜  Network: http://172.18.224.1:8100/

Call to "capacitor.cmd run android --no-sync --target R5CW143GQFX" is missing here!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions