ionic-team / angular-toolkit

Angular Schematics and Builders for `@ionic/angular` apps.
MIT License
69 stars 30 forks source link

bug: angular toolkit should work in angular 14 #474

Closed henkkelder closed 2 years ago

henkkelder commented 2 years ago

Prerequisites

Ionic Framework Version

Current Behavior

live reload using cordova and angular 14 does no longer work.

> ng.cmd run app:ionic-cordova-serve --host=localhost --port=8100 --platform=browser
[ng] This version of CLI is only compatible with Angular versions ^13.0.0 || ^13.3.0-rc.0,
[ng] but Angular version 14.0.6 was found instead.
[ng]
[ng] Please visit the link below to find instructions on how to update Angular.
[ng] https://update.angular.io/
[ng]

[ERROR] ng has unexpectedly closed (exit code 3).

Most likely cause is that @ionic/cordova-builders is not updated to use Angular 14.

Expected Behavior

Live reload should work.

Steps to Reproduce

Try to run any given cordova/angular 14 app with the -l option.

Code Reproduction URL

No response

Ionic Info

Ionic:

   Ionic CLI                     : 6.20.1 (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 6.1.14
   @angular-devkit/build-angular : 14.0.6
   @angular-devkit/schematics    : 14.0.6
   @angular/cli                  : 14.0.6
   @ionic/angular-toolkit        : 6.1.0

Cordova:

   Cordova CLI       : 11.0.0
   Cordova Platforms : android 11.0.0, browser 6.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 21 other plugins)

Utility:

   cordova-res : 0.15.4
   native-run  : 1.6.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\xxxxxx\AppData\Local\Android\Sdk)
   NodeJS            : v16.15.1 (C:\Program Files\nodejs\node.exe)
   npm               : 8.14.0
   OS                : Windows 10

Additional Information

I have reported the issue also at https://github.com/ionic-team/[angular-toolkit](https://github.com/ionic-team/angular-toolkit) but that doesn't seem t be monitored.

liamdebeasi commented 2 years ago

Thanks for the issue. It looks like the dependencies for the schematics and cordova-builders packages need to be updated for Angular 14:

Schematics: https://github.com/ionic-team/angular-toolkit/blob/8ff0a235e0f64b1afcab06ee1958ff6e6d474288/packages/cordova-builders/package.json#L38-L42 Cordova Builders: https://github.com/ionic-team/angular-toolkit/blob/8ff0a235e0f64b1afcab06ee1958ff6e6d474288/packages/schematics/package.json#L33

cc @mhartington

Gargamil commented 2 years ago

any plans for an update? Need it too..

henkkelder commented 2 years ago

When will this result in a release? Or Tag? Or is there another way how to use this fix?

mhartington commented 2 years ago

Didn't release on Friday because...well it's a friday.

But it's out now! Update to V7

henkkelder commented 2 years ago

And it works :-)

chrux commented 2 years ago

Awesome!