I created an ionic 2 application using CLI
ionic start myApp blank --v2
When I run ionic serve, I get the following output in console:
> ionic-hello-world@ ionic:serve /data/apps/myApp
> ionic-app-scripts serve “–v2” “–lab” “–address” “0.0.0.0” “–port” “8100” “–livereload-port” “35729”
[17:59:11] ionic-app-scripts 1.1.0
[17:59:11] watch started ...
[17:59:11] build dev started ...
[17:59:11] clean started ...
[17:59:11] clean finished in 17 ms
[17:59:11] copy started ...
[17:59:11] transpile started ...
[17:59:19] transpile finished in 7.75 s
[17:59:19] preprocess started ...
[17:59:19] preprocess finished in less than 1 ms
[17:59:19] webpack started ...
[17:59:20] copy finished in 8.81 s
[17:59:30] webpack finished in 11.17 s
[17:59:30] sass started ...
[17:59:33] sass finished in 2.52 s
[17:59:33] postprocess started ...
[17:59:33] postprocess finished in less than 1 ms
[17:59:33] lint started ...
[17:59:33] build dev finished in 21.54 s
[17:59:33] watch ready in 21.63 s
[17:59:33] dev server running: http://localhost:8100/
[17:59:35] lint finished in 2.48 s
But the app is not launched automatically (I need to navigate to http://localhost:8100/ , there I can see it correctly).
The biggest problem for me, except of having to navigate to the url, is that --lab does not work for me (I guess from the same reason)
I work with Ubuntu 16.04, so anyway no IE worries.
The thing is that from the other app directory the app is launched with ionic serve and ionic serve --lab.
I work with Ubuntu 16.04 too (64-bit version) and I installed the lastest versions of Ionic (framework and CLI) and Cordova.
The biggest problem for me was the livereload which was not fully functional: as ionic serve didn’t launch browser, it didn’t refresh the browser after rebuild… I had to manually refresh it
I solved it using the -w option (ionic serve -w “google-chrome”).
Even with a default browser specified in system properties, I had to specified the browser through the ionic command. And that’s works
My ionic info:
cedric@ubuntu:~/Projects/projectTest$ ionic info
******************************************************
Your system information:
Cordova CLI: You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.5.0
Ionic Framework Version: 2.1.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.3
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.9.5
Xcode version: Not installed
I’m having exactly the same problem but with this terminal output:
root@352d83ce533b:/projects/myApp# ionic serve
Starting app-scripts server: --port 8100 --livereload-port 35729 --address 0.0.0.0 - Ctrl+C to cancel
[15:06:27] watch started ...
[15:06:27] build dev started ...
[15:06:27] clean started ...
[15:06:27] clean finished in 17 ms
[15:06:27] copy started ...
[15:06:27] transpile started ...
[15:06:31] transpile finished in 3.53 s
[15:06:31] preprocess started ...
[15:06:31] deeplinks started ...
[15:06:31] deeplinks finished in 19 ms
[15:06:31] preprocess finished in 23 ms
[15:06:31] webpack started ...
[15:06:31] copy finished in 3.97 s
[15:06:41] webpack finished in 10.07 s
[15:06:41] sass started ...
[15:06:43] sass finished in 1.55 s
[15:06:43] postprocess started ...
[15:06:43] postprocess finished in 15 ms
[15:06:43] lint started ...
[15:06:43] build dev finished in 15.27 s
[15:06:43] watch ready in 15.51 s
[15:06:43] dev server running: http://localhost:8100/
[15:06:43] Failed to open the browser: Command failed: xdg-open "http://localhost:8100" /usr/bin/xdg-open: 771:
/usr/bin/xdg-open: www-browser: not found /usr/bin/xdg-open: 771: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: elinks: not found /usr/bin/xdg-open: 771: /usr/bin/xdg-open:
links: not found /usr/bin/xdg-open: 771: /usr/bin/xdg-open: lynx: not found /usr/bin/xdg-open: 771:
/usr/bin/xdg-open: w3m: not found xdg-open: no method available for opening 'http://localhost:8100'
[15:06:46] lint finished in 3.52 s
Anyway, till now I didn’t have a problem of refreshing, actually each time I save some change in my code ionic compiles and the view is automatically refreshed.
And in order to access lab mode I used this url: http://localhost:8100/ionic-lab
(just in case someone will find it useful…)