Ionic serve --lab not working in ionic 2 rc.1

I am just starting with ionic 2 and having some trouble using ionic’s serve command.

  • using chrome: ionic serve -w chrome. right now ionic is not starting any browser.
  • ionic serve --lab, the same is happing, it start the server but no UI

Hello Martin,

Are you sure your ionic serve command finish without any error?

And better if you could try ionic serve only without --lab

This is the output from “ionic serve”

Running ‘serve:before’ npm script before serve

ionic-hello-world@ watch /Users/mha/projects/ionic2/MyFirstApp
ionic-app-scripts watch
[12:50:53] ionic-app-scripts 0.0.36
[12:50:53] watch started …
[12:50:53] build dev started …
[12:50:53] clean started …
[12:50:53] clean finished in 5 ms
[12:50:53] copy started …
[12:50:53] transpile started …
[12:50:53] lint started …
[12:50:54] lint finished in 820 ms
[12:50:55] transpile finished in 2.02 s
[12:50:55] bundle started …
[12:50:55] copy finished in 2.06 s
[12:51:01] bundle finished in 6.38 s
[12:51:01] sass started …
[12:51:03] sass finished in 1.24 s
[12:51:03] build dev finished in 9.66 s
[12:51:03] watch ready in 9.70 s
Running live reload server: http://localhost:35729
Watching: www//*, !www/lib//, !www/**/.map
√ Running dev server: http://localhost:8100
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit

Okay, looks like you do not have error in your app syntax

Now can you manually open http://localhost:8100 in your browser, hope this will work even if ionic is not opening browser automatically.

Thanks, but I am missing the lab feature, looks cool

I found out that if you use sidemenu template the app never loads. This problem has not happened before.
The command which has problem:
$ ionic start helloWorld sidemenu --v2

You can try to use this command to start a project instead.

$ionic start helloWorld --v2

It seems this has just been fixed. Check this link Error when creating ionic 2 sidemenu template app

I am using the blank template. But thanks for letting me know.

Sometimes lack of ionic.config.json is also a reason. It is under the root directory.
Also make sure that you have run " npm -g install cordova"

Its working now, just not with chrome

“name”: “MyFirstApp”,
“app_id”: “12345678”,
“v2”: true,
“typescript”: true,
“defaultBrowser”: “safari”

Good. What have you done to fix it?

I think I was running ionic serve -f chrome and it must have set chrome to the default browser.
I was not aware of the ionic config file so thank for pointing me in that direction.

So I simple replaced chrome with safari.

Good that it helped:)
I normally use “ionic serve -c --lab” to test apps in my browser.

1 Like

It’s not working here too…

after run ‘ionic serve --lab’ opens a page with the error:

Cannot GET /__ion-dev-server/ionic_lab.html

ionic serve is working but ionic lab is say localhost connection refused

in my project app id is not show