ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Ionic cordova run ios -l --external not working with angular 14.0.1

Open djbanana1 opened this issue 2 years ago • 13 comments

Description: I tried to run my ionic app using ionic cordova run ios -l --external on my iphone. After selecting the IP, the command fails. The same problem happens when i try to run ionic cordova emulate ios --livereload. Building the app while using ionic cordova build ios is working fine without any issues.

Steps to Reproduce: I am using ionic v 6.19.1 and angular 14.0.1 and tried to run: ionic cordova run ios -l --external. After entering the command, i am able to select the IP i want to use.

Suddenly the command stops and throws the error below.

Output:

Running -- verbose is not returning more in

my-user % ionic cordova run ios -l --external  --verbose                        
 ionic:lib Terminal info: { ci: false, shell: '/bin/zsh', tty: true, windows: false } +0ms
  ionic:lib CLI global options: { _: [ 'cordova', 'run', 'ios' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, l: true, external: true, project: null, '--': [] } +3ms
  ionic:lib:project Project type from config: @ionic/angular (angular) +0ms
  ionic:lib:project Project details: { context: 'app', type: 'angular', errors: [], configPath: '/Users/ultrastark/Documents/projects/ultrastark/megaphone-app/ionic.config.json' } +0ms
  ionic Context: { binPath: '/usr/local/lib/node_modules/@ionic/cli/bin/ionic', libPath: '/usr/local/lib/node_modules/@ionic/cli', execPath: '/Users/ultrastark/Documents/projects/ultrastark/megaphone-app', version: '6.19.1' } +0ms
  ionic:lib:integrations:cordova:config Loading Cordova Config (config.xml: '/Users/ultrastark/Documents/projects/ultrastark/megaphone-app/config.xml', package.json: '/Users/ultrastark/Documents/projects/ultrastark/megaphone-app/package.json') +0ms
  ionic:commands:run Native platform devices: [
  ionic:commands:run   {
  ionic:commands:run     platform: 'ios',
  ionic:commands:run     name: 'iPhone von Diego',
  ionic:commands:run     model: 'iPhone10,6',
  ionic:commands:run     sdkVersion: '15.5'
  ionic:commands:run   },
  ionic:commands:run   {
  ionic:commands:run     platform: 'ios',
  ionic:commands:run     name: 'iPhone von Luca',
  ionic:commands:run     model: 'iPhone11,2',
  ionic:commands:run     sdkVersion: '13.1.2'
  ionic:commands:run   }
  ionic:commands:run ] +0ms
[INFO] Hardware device(s) found for ios. Using --device.
  ionic:lib:serve serve options: {
  ionic:lib:serve   '--': [],
  ionic:lib:serve   host: '0.0.0.0',
  ionic:lib:serve   browser: undefined,
  ionic:lib:serve   browserOption: undefined,
  ionic:lib:serve   engine: 'cordova',
  ionic:lib:serve   externalAddressRequired: true,
  ionic:lib:serve   lab: false,
  ionic:lib:serve   labHost: 'localhost',
  ionic:lib:serve   labPort: 8200,
  ionic:lib:serve   livereload: true,
  ionic:lib:serve   open: false,
  ionic:lib:serve   platform: 'ios',
  ionic:lib:serve   port: 8100,
  ionic:lib:serve   proxy: true,
  ionic:lib:serve   project: 'app',
  ionic:lib:serve   publicHost: undefined,
  ionic:lib:serve   verbose: false,
  ionic:lib:serve   consolelogs: undefined,
  ionic:lib:serve   consolelogsPort: undefined,
  ionic:lib:serve   ssl: undefined,
  ionic:lib:serve   configuration: undefined,
  ionic:lib:serve   sourcemaps: undefined
  ionic:lib:serve } +0ms
  ionic:lib:telemetry Sending telemetry for command: 'ionic cordova run' [
  ionic:lib:telemetry   'ios',
  ionic:lib:telemetry   '--external',
  ionic:lib:telemetry   '--livereload',
  ionic:lib:telemetry   '--device',
  ionic:lib:telemetry   '--verbose',
  ionic:lib:telemetry   '--interactive',
  ionic:lib:telemetry   '--color'
  ionic:lib:telemetry ] +0ms
  ionic:lib:hooks Looking for ionic:serve:before npm script. +0ms
[WARN] Multiple network interfaces detected!
       
       You will be prompted to select an external-facing IP for the dev server that your device or emulator can access.
       Make sure your device is on the same Wi-Fi network as your computer. Learn more about Live Reload in the docs[1].
       
       To bypass this prompt, use the --public-host option (e.g. --public-host=192.168.6.52). You can alternatively bind
       the dev server to a specific IP (e.g. --host=192.168.6.52).
       
       [1]: https://ion.link/livereload-docs
       
? Please select which IP to use: 192.168.6.52 (en0)
  ionic:utils-network checking for open port on 0.0.0.0:8100 +0ms
  ionic:utils-network checking for open port on 127.0.0.1:8100 +4ms
  ionic:utils-network checking for open port on 0.0.0.0:8101 +1ms
  ionic:utils-network checking for open port on 127.0.0.1:8101 +1ms
  ionic:utils-network checking for open port on ::1:8101 +0ms
  ionic:utils-network checking for open port on fe80::1:8101 +1ms
  ionic:utils-network error while checking fe80::1:8101: Error: listen EADDRNOTAVAIL: address not available fe80::1:8101     at Server.setupListenHandle [as _listen2] (net.js:1314:21)     at listenInCluster (net.js:1379:12)     at doListen (net.js:1516:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EADDRNOTAVAIL', errno: -49, syscall: 'listen', address: 'fe80::1', port: 8101 } +1ms
  ionic:utils-network checking for open port on 192.168.6.52:8101 +1ms
  ionic:utils-network checking for open port on fe80::641c:14ff:fecc:9c80:8101 +2ms
  ionic:utils-network error while checking fe80::641c:14ff:fecc:9c80:8101: Error: listen EADDRNOTAVAIL: address not available fe80::641c:14ff:fecc:9c80:8101     at Server.setupListenHandle [as _listen2] (net.js:1314:21)     at listenInCluster (net.js:1379:12)     at doListen (net.js:1516:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EADDRNOTAVAIL', errno: -49, syscall: 'listen', address: 'fe80::641c:14ff:fecc:9c80', port: 8101 } +0ms
  ionic:utils-network checking for open port on fe80::641c:14ff:fecc:9c80:8101 +1ms
  ionic:utils-network error while checking fe80::641c:14ff:fecc:9c80:8101: Error: listen EADDRNOTAVAIL: address not available fe80::641c:14ff:fecc:9c80:8101     at Server.setupListenHandle [as _listen2] (net.js:1314:21)     at listenInCluster (net.js:1379:12)     at doListen (net.js:1516:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EADDRNOTAVAIL', errno: -49, syscall: 'listen', address: 'fe80::641c:14ff:fecc:9c80', port: 8101 } +0ms
  ionic:utils-network checking for open port on fe80::5e75:3e66:880c:54b3:8101 +0ms
  ionic:utils-network error while checking fe80::5e75:3e66:880c:54b3:8101: Error: listen EADDRNOTAVAIL: address not available fe80::5e75:3e66:880c:54b3:8101     at Server.setupListenHandle [as _listen2] (net.js:1314:21)     at listenInCluster (net.js:1379:12)     at doListen (net.js:1516:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EADDRNOTAVAIL', errno: -49, syscall: 'listen', address: 'fe80::5e75:3e66:880c:54b3', port: 8101 } +0ms
  ionic:utils-network checking for open port on fe80::ea73:961b:ecfc:8ac:8101 +1ms
  ionic:utils-network error while checking fe80::ea73:961b:ecfc:8ac:8101: Error: listen EADDRNOTAVAIL: address not available fe80::ea73:961b:ecfc:8ac:8101     at Server.setupListenHandle [as _listen2] (net.js:1314:21)     at listenInCluster (net.js:1379:12)     at doListen (net.js:1516:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EADDRNOTAVAIL', errno: -49, syscall: 'listen', address: 'fe80::ea73:961b:ecfc:8ac', port: 8101 } +1ms
  ionic:utils-network checking for open port on fe80::ce81:b1c:bd2c:69e:8101 +0ms
  ionic:utils-network error while checking fe80::ce81:b1c:bd2c:69e:8101: Error: listen EADDRNOTAVAIL: address not available fe80::ce81:b1c:bd2c:69e:8101     at Server.setupListenHandle [as _listen2] (net.js:1314:21)     at listenInCluster (net.js:1379:12)     at doListen (net.js:1516:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EADDRNOTAVAIL', errno: -49, syscall: 'listen', address: 'fe80::ce81:b1c:bd2c:69e', port: 8101 } +0ms
  ionic:utils-network checking for open port on fe80::84e3:9df2:a16d:873b:8101 +0ms
  ionic:utils-network error while checking fe80::84e3:9df2:a16d:873b:8101: Error: listen EADDRNOTAVAIL: address not available fe80::84e3:9df2:a16d:873b:8101     at Server.setupListenHandle [as _listen2] (net.js:1314:21)     at listenInCluster (net.js:1379:12)     at doListen (net.js:1516:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EADDRNOTAVAIL', errno: -49, syscall: 'listen', address: 'fe80::84e3:9df2:a16d:873b', port: 8101 } +1ms
  ionic:utils-network checking for open port on fe80::aede:48ff:fe00:1122:8101 +0ms
  ionic:utils-network error while checking fe80::aede:48ff:fe00:1122:8101: Error: listen EADDRNOTAVAIL: address not available fe80::aede:48ff:fe00:1122:8101     at Server.setupListenHandle [as _listen2] (net.js:1314:21)     at listenInCluster (net.js:1379:12)     at doListen (net.js:1516:7)     at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EADDRNOTAVAIL', errno: -49, syscall: 'listen', address: 'fe80::aede:48ff:fe00:1122', port: 8101 } +0ms
  ionic:utils-network checking for open port on 10.0.71.3:8101 +0ms
  ionic:lib:serve Looking for ionic:serve npm script. +6s
> ng run app:ionic-cordova-serve --host=0.0.0.0 --port=8101 --platform=ios
[ng] 2022-06-14T13:28:14.807Z ng:analytics getAnalytics
[ng] 2022-06-14T13:28:14.808Z ng:analytics Workspace Analytics config found: false
[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.1 was found instead.
[ng] 
[ng] Please visit the link below to find instructions on how to update Angular.
[ng] https://update.angular.io/
[ng] 
  ionic:lib:serve received unexpected close for ng (code: 3) +5s

[ERROR] ng has unexpectedly closed (exit code 3).
        
        The Ionic CLI will exit. Please check any output above for error details.
  ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
  ionic:utils-process onBeforeExit handler: running 1 functions +0ms
  ionic:utils-process processExit: exiting (exit code: 1) +46ms

My ionic info:

Ionic:

   Ionic CLI                     : 6.19.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.1.9-dev.11654275237.1b595be3
   @angular-devkit/build-angular : 14.0.1
   @angular-devkit/schematics    : 14.0.1
   @angular/cli                  : 14.0.1
   @ionic/angular-toolkit        : 6.1.0

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-webview 5.0.0, (and 21 other plugins)

Utility:

   cordova-res (update available: 0.15.4) : 0.15.1
   native-run (update available: 1.6.0)   : 1.5.0

System:

   ios-deploy : 1.11.4
   ios-sim    : 8.0.2
   NodeJS     : v14.18.1 (/usr/local/bin/node)
   npm        : 8.10.0
   OS         : macOS Monterey
   Xcode      : Xcode 13.4.1 Build version 13F100

djbanana1 avatar Jun 14 '22 13:06 djbanana1

Same problem is happening to me while migrating an old ionic project from ionic 5 / angular 11 to ionic 6 / angular 14.

I thought I was missing some steps during the update, so I decided to create a new project using the latest ionic/cli and the latest angular/cli and it still breaks. Instead. installing (locally) Angular 13.3.8 works normally. I think it might be related to cordova-builders.

Working configuration with Angular 13.3.8

$ ionic info

Ionic:                                                                                                               
                                                                                                                     
   Ionic CLI                     : 6.20.0
   Ionic Framework               : @ionic/angular 6.1.10                                                             
   @angular-devkit/build-angular : 13.3.8                                                                            
   @angular-devkit/schematics    : 13.3.8                                                                            
   @angular/cli                  : 13.3.8                                                                            
   @ionic/angular-toolkit        : 6.1.0                                                                             
                                                                                                                     
Cordova:                                                                                                             
                                                                                                                     
   Cordova CLI       : 10.0.0 ([email protected])                                                                   
   Cordova Platforms : android 9.1.0                                                                                 
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)
                                                                                                                     
Utility:                                                                                                             
                                                                                                                     
   cordova-res (update available: 0.15.4) : 0.15.3                                                                   
   native-run (update available: 1.6.0)   : 1.3.0                                                                    
                                                                                                                     
System:                                                                                                              

   Android SDK Tools : 26.1.1
   NodeJS            : v14.15.4 (C:\Program Files\nodejs\node.exe)
   npm               : 6.14.10
   OS                : Windows 10


EDIT: The changes below allow the app to run successfully on the device with Angular 14, but the cli commands e.g. ionic g page ... are not working.

Install with npm

 "@ionic/angular-toolkit": "^3.1.1",

and in angular.json use the old angular-toolkit instead of the new cordova-builders (which works up to angular 13.3.8)

  "ionic-cordova-build": {
        "builder": "@ionic/angular-toolkit:cordova-build",
        "options": {
          "browserTarget": "app:build"
        },
        "configurations": {
          "production": {
            "browserTarget": "app:build:production"
          }
        }
      },
      "ionic-cordova-serve": {
        "builder": "@ionic/angular-toolkit:cordova-serve",
        "options": {
          "cordovaBuildTarget": "app:ionic-cordova-build",
          "devServerTarget": "app:serve"
        },
        "configurations": {
          "production": {
            "cordovaBuildTarget": "app:ionic-cordova-build:production",
            "devServerTarget": "app:serve:production"
          }
        }
      }

Ultimately, working configuration with Angular 14 and Ionic 6

$ ionic info

Ionic:                                                                                                               
                                                                                                                     
   Ionic CLI                     : 6.20.0
   Ionic Framework               : @ionic/angular 6.1.10                                                             
   @angular-devkit/build-angular : 14.0.2                                                                            
   @angular-devkit/schematics    : 13.3.8                                                                            
   @angular/cli                  : 14.0.2                                                                            
   @ionic/angular-toolkit        : 3.1.1                                                                             
                                                                                                                     
Cordova:                                                                                                             
                                                                                                                     
   Cordova CLI       : 10.0.0 ([email protected])                                                                   
   Cordova Platforms : android 9.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)

Utility:

   cordova-res (update available: 0.15.4) : 0.15.3
   native-run (update available: 1.6.0)   : 1.3.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\g.trontini\AppData\Local\Android\Sdk)
   NodeJS            : v14.15.4 (C:\Program Files\nodejs\node.exe)
   npm               : 6.14.10
   OS                : Windows 10

gianluigitrontini avatar Jun 17 '22 10:06 gianluigitrontini

Ever since updating Angular to 14.0.2, I can't get past this step either:

[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.1 was found instead. 

I have tried downgrading Angular globally to version 13.0.0 to no avail.

@gianluigitrontini How did you go about implementing your workaround? DId you edit the files themselves, or manually "brute-force" install the necessary dependencies using NPM?

Here is my current environment:

Ionic:

   Ionic CLI                     : 6.20.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.1.10
   @angular-devkit/build-angular : 14.0.2
   @angular-devkit/schematics    : 14.0.2
   @angular/cli                  : 14.0.2
   @ionic/angular-toolkit        : 6.1.0

Cordova:

   Cordova CLI       : 11.0.0
   Cordova Platforms : android 10.1.2, ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)

Utility:

   cordova-res : 0.15.4
   native-run  : 1.6.0

System:

   ios-deploy : 1.11.4
   ios-sim    : 8.0.2
   NodeJS     : v16.15.1 (/usr/local/bin/node)
   npm        : 8.11.0
   OS         : macOS Monterey
   Xcode      : Xcode 13.4.1 Build version 13F100

lincolnberryiii avatar Jun 21 '22 13:06 lincolnberryiii

I have the same problems while working on an android app. Exactly the same failure message, slightly newer dependencies and developing for android. My ionic info:

Ionic:                                                                                                                
                                                                                                                      
   Ionic CLI                     : 6.20.0                                                                             
   Ionic Framework               : @ionic/angular 6.1.10                                                              
   @angular-devkit/build-angular : 14.0.2                                                                             
   @angular-devkit/schematics    : 14.0.2                                                                             
   @angular/cli                  : 14.0.2                                                                             
   @ionic/angular-toolkit        : 6.1.0                                                                              
                                                                                                                      
Cordova:                                                                                                              
                                                                                                                      
   Cordova CLI       : 11.0.0                                                                                         
   Cordova Platforms : android 8.1.0                                                                                  
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 14 other plugins)
                                                                                                                      
Utility:                                                                                                              
                                                                                                                      
   cordova-res : not installed globally                                                                               
   native-run  : not installed globally                                                                               
                                                                                                                      
System:                                                                                                               
                                                                                                                      
   Android SDK Tools : 26.1.1 (C:\Source\WorkspacePosy\program\android_sdks)                                          
   NodeJS            : v16.13.1 (C:\Program Files\nodejs\node.exe)                                                    
   npm               : 8.1.2                                                                                          
   OS                : Windows 10                

TimJ0212 avatar Jun 21 '22 14:06 TimJ0212

@lincolnberryiii @TimJ0212

I do not recommend trying my workaround to make it work with Angular 14. I had no success running ionic generate ... commands from the CLI. However, if you want to give it a shot, manually install "@ionic/angular-toolkit": "^3.1.1" and change the angular.json to use it instead of cordova-builders (as I wrote in my last message).


Your overall configuration is correct, just downgrade to Angular 13.3.8 (latest 13 stable version, I guess).

In package.json, manually change all your @angular packages versions to 13.3.8 (devkit, cli, compiler etc) then delete package-lock.json and node_modules and run npm install (just to be safe).

I guess the culprit is cordova-builders which isn't working yet with Angular 14.

If it might still not work, check if you have changed your angular.json to use @ionic/cordova-builders as the official article says https://ionicframework.com/blog/updates-to-ionic-angular-toolkit/

As a last resort, try to use node 14.15.4 (that's what I'm using for this project)


I also noticed that typescript can cause other errors to appear. I'm sure that it works using v.4.4.4 instead of the newer versions

 "typescript": "^4.4.4",

gianluigitrontini avatar Jun 21 '22 14:06 gianluigitrontini

@gianluigitrontini I followed your suggestions step-by-step and it now works. Thank you very much!

Here is my resulting environment:

Ionic:

   Ionic CLI                     : 6.20.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.1.10
   @angular-devkit/build-angular : 13.3.8
   @angular-devkit/schematics    : 13.3.8
   @angular/cli                  : 13.3.8
   @ionic/angular-toolkit        : 3.1.1

Cordova:

   Cordova CLI       : 11.0.0
   Cordova Platforms : android 10.1.2, ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)

Utility:

   cordova-res : 0.15.4
   native-run  : 1.6.0

System:

   ios-deploy : 1.11.4
   ios-sim    : 8.0.2
   NodeJS     : v16.15.1 (/usr/local/bin/node)
   npm        : 8.11.0
   OS         : macOS Monterey
   Xcode      : Xcode 13.4.1 Build version 13F100

lincolnberryiii avatar Jun 21 '22 16:06 lincolnberryiii

@lincolnberryiii I think you can also try updating @ionic/angular-toolkit to the latest version (v6) and it should still work.

gianluigitrontini avatar Jun 21 '22 20:06 gianluigitrontini

Android Build and Live reload not working.. Please help me


   Ionic CLI                     : 6.19.0 (C:\Users\Avirup Ghosh\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 6.1.11
   @angular-devkit/build-angular : 13.3.8
   @angular-devkit/schematics    : 13.3.8
   @angular/cli                  : 13.3.8
   @ionic/angular-toolkit        : 4.0.0

Cordova:

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

Utility:

   cordova-res : 0.15.4
   native-run  : 1.6.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\Avirup Ghosh\AppData\Local\Android\Sdk)
   NodeJS            : v16.14.2 (C:\Program Files\nodejs\node.exe)
   npm               : 8.12.2
   OS                : Windows 10   

Error

This version of CLI is only compatible with Angular versions ^13.0.0 || ^13.3.0-rc.0,
but Angular version 14.0.2 was found instead.

Please visit the link below to find instructions on how to update Angular.
https://update.angular.io/

[ERROR] An error occurred while running subprocess ng.

GhoshWorld avatar Jun 22 '22 14:06 GhoshWorld

@GhoshWorld The error you're getting clearly states that you have Angular@14 installed. Try to downgrade to [email protected] both locally and globally.

gianluigitrontini avatar Jun 22 '22 15:06 gianluigitrontini

@gianluigitrontini Now I install [email protected] but after project create package.json like

 "dependencies": {
    "@angular/common": "^14.0.0",
    "@angular/core": "^14.0.0",
    "@angular/forms": "^14.0.0",
    "@angular/platform-browser": "^14.0.0",
    "@angular/platform-browser-dynamic": "^14.0.0",
    "@angular/router": "^14.0.0",
    "@capacitor/core": "3.6.0",
    "@ionic/angular": "^6.1.9",
    "rxjs": "~6.6.0",
    "tslib": "^2.2.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^14.0.0",
    "@angular-eslint/builder": "~13.0.1",
    "@angular-eslint/eslint-plugin": "~13.0.1",
    "@angular-eslint/eslint-plugin-template": "~13.0.1",
    "@angular-eslint/template-parser": "~13.0.1",
    "@angular/cli": "^14.0.0",
    "@angular/compiler": "^14.0.0",
    "@angular/compiler-cli": "^14.0.0",
    "@angular/language-service": "^14.0.0",
    "@ionic/angular-toolkit": "^6.0.0",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.11.1",
    "@typescript-eslint/eslint-plugin": "5.3.0",
    "@typescript-eslint/parser": "5.3.0",
    "eslint": "^7.6.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsdoc": "30.7.6",
    "eslint-plugin-prefer-arrow": "1.2.2",
    "jasmine-core": "~3.8.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~6.3.2",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "typescript": "~4.7.3"
  }

My Angular version

Angular CLI: 13.3.8
Node: 16.14.2
Package Manager: npm 6.14.16
OS: win32 x64

Angular: undefined
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1303.8 (cli-only)
@angular-devkit/core         13.3.8 (cli-only)
@angular-devkit/schematics   13.3.8 (cli-only)
@schematics/angular          13.3.8 (cli-only)

Now What can I do?

GhoshWorld avatar Jun 22 '22 17:06 GhoshWorld

Your overall configuration is correct, just downgrade to Angular 13.3.8 (latest 13 stable version, I guess).

In package.json, manually change all your @angular packages versions to 13.3.8 (devkit, cli, compiler etc) then delete package-lock.json and node_modules and run npm install (just to be safe).

@GhoshWorld Try downgrading "manually" until your package.json, ionic info and ng version have angular 13.3.x.

gianluigitrontini avatar Jun 23 '22 06:06 gianluigitrontini

@gianluigitrontini Thank you so much. I will change all my package version 13.3.8 and its work fine.

 "dependencies": {
    "@angular/common": "^13.3.8",
    "@angular/core": "^13.3.8",
    "@angular/forms": "^13.3.8",
    "@angular/platform-browser": "^13.3.8",
    "@angular/platform-browser-dynamic": "^13.3.8",
    "@angular/router": "^13.3.8",
    "@capacitor/app": "1.1.1",
    "@capacitor/core": "3.6.0",
    "@capacitor/haptics": "1.1.4",
    "@capacitor/keyboard": "1.2.3",
    "@capacitor/status-bar": "1.0.8",
    "@ionic/angular": "^6.1.9",
    "@ionic/cordova-builders": "^6.1.0",
    "cordova-android": "10.1.2",
    "rxjs": "~6.6.0",
    "tslib": "^2.2.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^13.3.8",
    "@angular-eslint/builder": "~13.0.1",
    "@angular-eslint/eslint-plugin": "~13.0.1",
    "@angular-eslint/eslint-plugin-template": "~13.0.1",
    "@angular-eslint/template-parser": "~13.0.1",
    "@angular/cli": "^13.3.8",
    "@angular/compiler": "^13.3.8",
    "@angular/compiler-cli": "^13.3.8",
    "@angular/language-service": "^13.3.8",
    "@capacitor/cli": "3.6.0",
    "@ionic/angular-toolkit": "^3.1.1",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.11.1",
    "@typescript-eslint/eslint-plugin": "5.3.0",
    "@typescript-eslint/parser": "5.3.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^5.0.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "eslint": "^7.6.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsdoc": "30.7.6",
    "eslint-plugin-prefer-arrow": "1.2.2",
    "jasmine-core": "~3.8.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~6.3.2",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "typescript": "~4.7.3"
  },

GhoshWorld avatar Jun 23 '22 16:06 GhoshWorld

@gianluigitrontini Short question, but do you have any intend to accept angular v14 ? If yes, do you now approximatively when this will happen ?

To know if I should downgrade or be patient :)

Chears

rbalet avatar Jul 01 '22 15:07 rbalet

Hey @rbalet, I wish I could help you but I'm just a developer who uses Ionic to build apps for the company I'm working for! Let's wait for some official responses, until then I'd say that angular@13 is the latest version supported by Ionic!

gianluigitrontini avatar Jul 02 '22 09:07 gianluigitrontini

If I create a new angular app with latest Ionic CLI I get this packages and live reload works fine for iOS

"dependencies": {
    "@angular/common": "^14.0.0",
    "@angular/core": "^14.0.0",
    "@angular/forms": "^14.0.0",
    "@angular/platform-browser": "^14.0.0",
    "@angular/platform-browser-dynamic": "^14.0.0",
    "@angular/router": "^14.0.0",
    "@capacitor/app": "4.0.1",
    "@capacitor/core": "4.1.0",
    "@capacitor/haptics": "4.0.1",
    "@capacitor/keyboard": "4.0.1",
    "@capacitor/status-bar": "4.0.1",
    "@ionic/angular": "^6.1.9",
    "@ionic/cordova-builders": "^7.0.0",
    "cordova-ios": "6.2.0",
    "rxjs": "~6.6.0",
    "tslib": "^2.2.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^14.0.0",
    "@angular-eslint/builder": "~13.0.1",
    "@angular-eslint/eslint-plugin": "~13.0.1",
    "@angular-eslint/eslint-plugin-template": "~13.0.1",
    "@angular-eslint/template-parser": "~13.0.1",
    "@angular/cli": "^14.0.0",
    "@angular/compiler": "^14.0.0",
    "@angular/compiler-cli": "^14.0.0",
    "@angular/language-service": "^14.0.0",
    "@capacitor/cli": "4.1.0",
    "@ionic/angular-toolkit": "^6.0.0",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.11.1",
    "@typescript-eslint/eslint-plugin": "5.3.0",
    "@typescript-eslint/parser": "5.3.0",
    "cordova-plugin-device": "2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^5.0.0",
    "cordova-plugin-splashscreen": "5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "eslint": "^7.6.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsdoc": "30.7.6",
    "eslint-plugin-prefer-arrow": "1.2.2",
    "jasmine-core": "~3.8.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~6.3.2",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "typescript": "~4.7.3"
  },

angular packages are on version 14 except for some angular eslint related packages are still on 13

Make sure you are using latest Ionic CLI (6.20.1) because there was a bug that didn't add @ionic/cordova-builders in some cases and that could be causing your issue.

jcesarmobile avatar Aug 22 '22 18:08 jcesarmobile