Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IONIC : A utility CLI has unexpectedly closed

Tags:

I got this error when i run ionic serve The Ionic CLI will exit. Please check any output above for error details.

my ionic info

$ionic info Ionic:     ionic (Ionic CLI)  : 4.0.1 (C:\Users\Pc\AppData\Roaming\npm\node_modules\ionic)    Ionic Framework    : ionic-angular 3.9.2    @ionic/app-scripts : 3.1.8  Cordova:     cordova (Cordova CLI) : 8.0.0    Cordova Platforms     : android 7.0.0  System:     Android SDK Tools : 25.3.1    NodeJS            : v6.10.1 (C:\Program Files\nodejs\node.exe)    npm               : 5.3.0    OS                : Windows 10  Environment:     ANDROID_HOME : C:\Users\Pc\AppData\Local\Android\sdk 
like image 244
yali Avatar asked Jul 28 '18 08:07

yali


2 Answers

Run the below command, being in root directory of Ionic project:

npm install @ionic/app-scripts@latest --save-dev 

Then you can try Ionic serve or Ionic s.

like image 83
Rakesh Mishra Avatar answered Sep 18 '22 11:09

Rakesh Mishra


I had a similar issue:

Assertion `args[1]->IsString()' failed.

A utility CLI has unexpectedly closed

I fixed that by installing natives lib through npm:

npm i natives 
like image 24
Nourdine Alouane Avatar answered Sep 17 '22 11:09

Nourdine Alouane