IONIC : A utility CLI has unexpectedly closed

前端 未结 10 2180
半阙折子戏
半阙折子戏 2021-02-04 04:19

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:

   i         


        
相关标签:
10条回答
  • 2021-02-04 04:43

    I had a similar issue. I tried several different solutions, and for some reason different ones worked on different machines. Because I'm an illogical masochist, I attempted to fix this issue in the same project on 3 different laptops instead of sending the new fixed version to the other laptops.

    The best answer I came up with is to:

    • Delete node_modules
    • copy node_modules from a different project (I used an earlier version of my app)
    • run npm i to install any missing modules

    I think this approach should work for almost all instances.

    0 讨论(0)
  • 2021-02-04 04:47

    Try replacing the package.json scripts parts. Worked for me.

      "scripts": {
        "build": "ionic build",
        "serve": "ionic build",
        "start": "npm run serve"
      },
    
    0 讨论(0)
  • 2021-02-04 04:49

    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
    
    0 讨论(0)
  • 2021-02-04 04:51

    Simpy run

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

    and then

    ionic serve
    

    This error is because of some audit during installing a plugin or adding a plug in

    0 讨论(0)
提交回复
热议问题