Ionic serve starts and stops

I ma trying to get started here. I have installed the latest Node, NPM and Ionic. I have create my first app using ionic start ionic3_1stTutorial. Then when I run ionic serve i see the following:

 Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser -
Ctrl+C to cancel
[10:00:40]  watch started ...
[10:00:40]  build dev started ...
[10:00:40]  clean started ...
[10:00:40]  clean finished in 6 ms
[10:00:40]  copy started ...
[10:00:40]  deeplinks started ...
[10:00:40]  deeplinks finished in 17 ms
[10:00:40]  transpile started ...
[10:00:42]  transpile finished in 2.74 s
[10:00:42]  preprocess started ...
[10:00:42]  preprocess finished in 3 ms
[10:00:42]  webpack started ...
[10:00:43]  copy finished in 2.89 s
[10:00:47]  webpack finished in 4.49 s
[10:00:47]  sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[10:00:48]  sass finished in 837 ms
[10:00:48]  postprocess started ...
[10:00:48]  postprocess finished in 5 ms
[10:00:48]  lint started ...
[10:00:48]  build dev finished in 8.18 s
[10:00:48]  watch ready in 8.30 s
[10:00:48]  dev server running: http://localhost:8100/

[OK] Development server running!
     Local: http://localhost:8100
     External: http://172.27.161.1:8100, http://10.0.75.1:8100, http://192.168.3.92:8100
     DevApp: IOnic3_1stTutorial@8100 on DESKTOP-F572B2I

Then the cursor is ready for input and the ionic task has stopped. I cannot navigate to the page.

ionic info shows

cli packages: (C:\Users\g.duffield\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.6
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 25.2.5
    Node              : v8.9.4
    npm               : 5.6.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Android\android-sdk

Misc:

    backend : pro

I have googled and tried anything/everything that has been suggested but still no change. At the moment this is a very frustrating start.

Any help or suggestions appreciated.

Greg

1 Like

Any additional output if you run the serve command with added --verbose at the end?
Does npm run ionic:serve work?

There is no additional information with the --verbose command. However npm run ionic:serve works and this launches the app in a browser fine - but does not allow Dev app connections etc.

So we are getting there :slight_smile:

I have seen this before. Make sure there is an issue about it at https://github.com/ionic-team/ionic-cli/issues and +1 it (or create a new one if there isn’t).

For the benfit of anyone stumbling onto this, the solution on Windows is to make sure that
c:\windows\system32 is in the PATH environment variable

2 Likes

Thanks! Remember to restart the console after adding the path

Thank you so so much!! :smiley:

I fix the problem, i have not configured unfortunately my enviroment variables.

Maybe you can help me, i wish to reset all my enviromental variables to default. I dont know how to do it.

Hi,

I have exactly the same probleme.
I set the path to c:\windows\system32 without
success

When I issue the command : ionic serve
it compile , start the server and then it stops !!

Anyone have an idea :

Here the info of my settings :

$ ionic info

cli packages: (C:\Users\poutpout\AppData\Roaming\npm\node_modules)

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

local packages:

@ionic/app-scripts : 3.1.0
Ionic Framework    : ionic-angular 3.9.2

System:

Node : v8.9.4
npm  : 6.4.1
OS   : Windows 10