Ionic CLI almost no output any more

I’m not sure it’s the same issue, but ionic-cli stopped displaying most of info.

BEFORE (outside my project)

$ ionic info
[WARN] You are not in an Ionic project directory. Project context may be missing.

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.7.0
    ionic (Ionic CLI) : 3.7.0


    Android SDK Tools : 26.0.2
    Node              : v8.2.1
    OS                : Linux 3.19
    npm               : 5.3.0


NOW (in my project root)

$ ionic info

The same for the other commands (I’m copying here the exact output):

$ ionic
$ ionic --help
$ ionic upload
Running app-scripts build: 

[10:36:01]  build dev started ... 
[10:36:01]  clean started ... 
[10:36:01]  clean finished in 4 ms 
[10:36:01]  copy started ... 
[10:36:01]  transpile started ... 
[10:36:05]  transpile finished in 3.58 s 
[10:36:05]  preprocess started ... 
[10:36:05]  deeplinks started ... 
[10:36:05]  deeplinks finished in 172 ms 
[10:36:05]  preprocess finished in 172 ms 
[10:36:05]  webpack started ... 
[10:36:05]  copy finished in 3.91 s 
[10:36:16]  webpack finished in 10.88 s 
[10:36:16]  sass started ... 
[10:36:18]  sass finished in 2.06 s 
[10:36:18]  postprocess started ... 
[10:36:18]  postprocess finished in 4 ms 
[10:36:18]  lint started ... 
[10:36:18]  build dev finished in 16.77 s 
[10:36:21]  lint finished in 2.76 s 

I’m running ionic and cordova locally in my project. After removing node_modules and running npm i it started working again, but this is not the first time it happens, so I think there’s a memory leak / bug somewhere. Now it’s working again, so I can post my env info:

$ ionic info

cli packages: (/var/www/imaat/mob/clients/myway/node_modules)

    @ionic/cli-plugin-cordova       : 1.6.2
    @ionic/cli-plugin-ionic-angular : 1.4.1
    @ionic/cli-utils                : 1.7.0
    ionic (Ionic CLI)               : 3.7.0

global packages:

    Cordova CLI : 7.0.1 

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : android 6.2.3 browser 4.1.0 ios 4.4.0
    Ionic Framework    : ionic-angular 3.6.0


    Android SDK Tools : 26.0.2
    Node              : v8.2.1
    OS                : Linux 3.19
    npm               : 5.3.0 

Next time it happens, is there some log I can send you so you can have a clue or analyze what’s happening?

When this happens to me - as it did yesterday. Use the --verbose to figure out what is going on and maybe failing.

ionic cordova run android --verbose

For me I had an unauthorized android emulator, is sat there trying to connect the debugger forever.

How exactly are you doing this?

I’m the same guy you talked to some time ago :smiley:

BTW thank you because the cli support is better now when running it locally in the project.

1 Like

I tried the --verbose param but nothing changed, same output. I also checked the logs in ~/.ionic/daemon.log (not sure if cli error are being saved in this file) and there were not related errors.

What do you get as ionic info outside of your project?
Is it broken everywhere or not in this one project?
If it is not broken everywhere, create a new project with ionic start blank blank and test there.

Nop, just the project local cli. I have it also installed in the global scope and that’s working good.

shamank@Paula:/var/www/imaat/mob/clients$ which ionic
shamank@Paula:/var/www/imaat/mob/clients$ cd myway/
shamank@Paula:/var/www/imaat/mob/clients/myway$ which ionic

After removing node_modules and running npm i it starts working again in my local project. I could not identify the exact moment when it stops echoing to the output (it continues working however), but I believe it’s when I’m debugging directly to device with ionic cordova run android -lsc --target=<my_device_id>. Not always, just sometimes.

There were now more releases, current is 3.9.1 - maybe it was fixed there.

I’ll let you know if it occurs again (just updated) and I’ll try to debug cli next time. Thanks!

1 Like