Ionic-cli: Ionic serve --lab issue with latest CLI update 3.7.0

Created on 3 Aug 2017  路  12Comments  路  Source: ionic-team/ionic-cli

Description:

After latest CLI update > Ionic serve --lab command do not build and run (live reload) as previous CLI

Steps to Reproduce:

  1. Create a blank starter ionic v3 app
  2. Run ionic serve --lab
  3. When the app loads in the browser (with --lab interface) close the browser (Kill the browser)
  4. Now, in the code editor make some changes to html page and save
  5. From CLI press CRTL + C, and again type - ionic serve --lab
  6. Now you will notice the last instance is picked up and below is displayed:
Starting app-scripts server: --lab --l --port 8100 --p 8100
       --livereload-port 35729 --r 35729 --address localhost - Ctrl+C to cancel
[10:46:53]  watch started ... 
[10:46:53]  build dev started ... 
  1. Open chrome and point your address bar to localhost:8100/ionic-lab
  2. Nothing shows up and it just keeps the browser spinner icon animating.

Output:
Chrome browser : Waiting for localhost

[INFO] Starting app-scripts server: --lab --l --port 8100 --p 8100
       --livereload-port 35729 --r 35729 --address localhost - Ctrl+C to cancel
[10:46:53]  watch started ... 
[10:46:53]  build dev started ... 

My work around

  1. Close the browser and Terminal
  2. Start again and I see below after ionic serve --lab:
**[INFO] Starting app-scripts server: --lab --l --port 8100 --p 8100
       --livereload-port 35729 --r 35729 --address localhost - Ctrl+C to cancel
[11:06:11]  watch started ... 
[11:06:11]  build dev started ... 
[11:06:11]  clean started ... 
[11:06:11]  clean finished in 3 ms 
[11:06:11]  copy started ... 
[11:06:11]  transpile started ... 
[11:06:14]  dev server running: http://localhost:8100/ 

[INFO] Development server running
       Local: http://localhost:8100

[11:06:14]  copy finished in 2.39 s 
[11:06:14]  watch ready in 2.46 s**

All works fine!

My ionic info:

cli packages: 

    @ionic/cli-plugin-cordova       : 1.6.1
    @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
    Ionic Framework    : ionic-angular 3.6.0

System:

    Android SDK Tools : 25.2.5
    Node              : v6.11.1
    OS                : macOS Sierra
    Xcode             : Xcode 8.3.3 Build version 8E3004b 
    ios-deploy        : 1.8.6 
    ios-sim           : 5.0.8 
    npm               : 3.10.10

Most helpful comment

Works fine for me on 3.8!

All 12 comments

@mokupindia Unable to reproduce the issue thus far. Does this still happen if you do ionic serve --lab --address=0.0.0.0 ?

I had the same problem (with or without the --lab option), but adding --address=x.x.x.x fixed it.

@dwieeb - Yes still have it: You need to do Ctrl + C to pause --lab, then in the same terminal try ionic serve --lab, I need to kill my terminal instance and restart every time i see below:

[INFO] Starting app-scripts server: --lab --l --port 8100 --p 8100
       --livereload-port 35729 --r 35729 --address localhost - Ctrl+C to cancel
[10:46:53]  watch started ... 
[10:46:53]  build dev started ... 

Then, it works like below:

**[INFO] Starting app-scripts server: --lab --l --port 8100 --p 8100
       --livereload-port 35729 --r 35729 --address localhost - Ctrl+C to cancel
[11:06:11]  watch started ... 
[11:06:11]  build dev started ... 
[11:06:11]  clean started ... 
[11:06:11]  clean finished in 3 ms 
[11:06:11]  copy started ... 
[11:06:11]  transpile started ... 
[11:06:14]  dev server running: http://localhost:8100/ 

[INFO] Development server running
       Local: http://localhost:8100

[11:06:14]  copy finished in 2.39 s 
[11:06:14]  watch ready in 2.46 s**

@mokupindia Yeah, I know. I followed your instructions. They're good reproduction steps, but I'm still not getting the issue. Could you maybe try on latest Node 8? If you don't mind, could you try starting an Ionic 1 app (Ionic 1 uses a different serve technology): ionic start --type=ionic1 and then ionic serve --lab

Had this issue too yesterday.
To reproduce, you need to be on 3.6.0, when you try and run any ionic * command, e.g ionic serve it prompts you that there is a new 3.7.0 version and to upgrade, if you choose Y and upgrade, it upgrades as expected. But then if you attempt to run ionic serve it starts to run as expected but stops here:

Michaels-MacBook-Pro:nation michael$ ionic serve
[INFO] Starting app-scripts server: --port 8100 --p 8100 --livereload-port 35729 --r 35729
--address localhost - Ctrl+C to cancel
[13:59:08] watch started ...
[13:59:08] build dev started ...

Fix for me was just to close visual studio (I use the built in terminal) and re-launch it, ionic serve works now. I used to have this problem when I worked on Windows machines but never had this when on a Mac

@dwieeb - Same issue still reproducible as stated by @Lyricalz

I've opened similar issue here: https://github.com/ionic-team/ionic-cli/issues/2577

I've used ionic lab --address localhost which works fine. However, it doesn't live reload.

Hey all, let me know if this is still an issue with 3.8. I've made a variety of fixes to ionic serve.

Works fine for me on 3.8!

You must kill all your Node processes. Maybe your port is already being used.

Was this page helpful?
0 / 5 - 0 ratings