Ionic serve not working in Ionic 3

前端 未结 20 576
眼角桃花
眼角桃花 2021-01-16 23:06

My Ionic info:

cli packages: (/usr/lib/node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 7.0.1 

local pack         


        
相关标签:
20条回答
  • 2021-01-16 23:34

    Try like this

    ionic serve --verbose =>didn’t work, there were errors;

    npm run ionic:build --verbose =>ran, finnished with OK.

    0 讨论(0)
  • 2021-01-16 23:34

    Delete the node_modules folder and then use the command

    npm install
    

    followed by

    ionic serve--verbose
    

    Hope that it works fine.

    0 讨论(0)
  • 2021-01-16 23:36

    I think your prob is the

    NODE version (6.9.1) .. 
    

    can you just try to upgrade to 9.1.0 or more?

    0 讨论(0)
  • 2021-01-16 23:36

    I have faced such a problem, tried a fresh new app, worked perfectly, tried another old app, also worked perfectly.

    Tried to stop using some modules (clipboard in my case and another one), solved the problem, in my case it was an error in the way I am importing or using it.

    ionic 5 is my ionic version

    Hope this will help someone

    0 讨论(0)
  • 2021-01-16 23:37

    my configurations for running ionic 3 application:

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

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1
    

    global packages:

    cordova (Cordova CLI) : 8.0.0 
    

    local packages:

    @ionic/app-scripts : 3.1.7
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2
    

    System:

    Android SDK Tools : 26.1.1
    Node              : v8.2.1
    npm               : 5.5.0 
    OS                : Linux 4.4
    

    Environment Variables:

    ANDROID_HOME : /root/Android/Sdk
    

    Misc:

    backend : pro
    
    0 讨论(0)
  • 2021-01-16 23:37

    Include below script in the package.json file

    "browser": "ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build"
    and run
    

    After It Run npm run browser

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