Ionic 离子服务“与NG连接性”问题

gcuhipw9  于 2022-12-08  发布在  Ionic
关注(0)|答案(1)|浏览(229)

我不知道我更新了什么或我做了什么,但当我运行离子服务命令时,它一直说“[INFO]等待与ng的连接..."。

ionic info

Ionic:

   Ionic CLI                     : 6.16.3 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.6.13
   @angular-devkit/build-angular : 0.1000.8
   @angular-devkit/schematics    : 10.0.8
   @angular/cli                  : 10.0.8
   @ionic/angular-toolkit        : 2.3.3

Capacitor:

   Capacitor CLI      : 2.4.5
   @capacitor/android : 2.4.8
   @capacitor/core    : 2.4.5
   @capacitor/ios     : 2.4.8

Utility:

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

System:

   NodeJS : v14.17.4 (/usr/local/bin/node)
   npm    : 6.14.14
   OS     : macOS Big Sur
bqucvtff

bqucvtff1#

I had the same problem using Ionic 6.
Running either of the following two commands resulted in the error "Waiting for connectivity with ng...":

ionic serve
ionic cordova run android --l

I think this issue occurs due to some network misconfiguration, however none of the above answers worked for me. Rebooting the mac didn't work either.
The only workaround I found was to add the --external option to the commands, that way everything works like a charm again.
For example:

ionic cordova run android --l --external

If it helps someone, remember to upvote this answer. Thanks and enjoy.

相关问题