Closed WillooWisp closed 4 months ago
Hey there,
The ionic cap
command is managed by the Ionic CLI, so I am going to move this to the CLI repo.
Okay, let's hope someone looks at this here then,
Do you have a sample app I can reproduce the issue in?
Looks like a bug in @angular-devkit/build-angular
, when using the esbuild configuration it seems to hang the execution, so it "blocks" the execution of the following capacitor commands, while the old configuration doesn't hang and the capacitor commands can run.
Since the esbuild configuration is still in preview, you should probably report this behavior change to angular team.
Okay? So where is the proper place to report this issue then, do you know?
Probably https://github.com/angular/angular-cli, it's the repository linked from npm for @angular-devkit/build-angular
package.
I've been doing more digging and looks like I was wrong and the problem is in Ionic CLI.
Since @angular-devkit/build-angular:browser-esbuild
uses vite, the Ionic CLI is not able to handle it correctly. We will need to create a new runner for Angular similar to the vue-vite
and react-vite
runners that were added recently.
I've just done a quick test and copied the vue-vite runner code into a new "angular-vite" type of app and it worked as expected.
Okay, yes, so it seems after the angular cli team investigated this.
still not fixed?
Same error here with Ionic 7.6.2 and Angular 17.0.8
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
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...
After angular 17 and esbuild...