Reputation: 6094
I have recently been trying to ionic labs view a try. From the docs, its as simple as the command ionic serve --lab
. But this only shows the normal ionic serve
view not android and iphone view . I do not see any errors.
$ ionic serve -l
> ionic-hello-world@ ionic:serve /home/raj/ionic/bookemon
> ionic-app-scripts serve "--v2" "--lab" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
[12:10:35] ionic-app-scripts 1.0.0
[12:10:35] watch started ...
[12:10:35] build dev started ...
[12:10:35] clean started ...
[12:10:35] clean finished in 6 ms
[12:10:35] copy started ...
[12:10:35] transpile started ...
[12:10:39] transpile finished in 3.58 s
[12:10:39] webpack started ...
[12:10:39] copy finished in 3.74 s
[12:10:46] webpack finished in 6.89 s
[12:10:46] sass started ...
[12:10:47] sass finished in 719 ms
[12:10:47] build dev finished in 11.23 s
[12:10:47] watch ready in 11.31 s
[12:10:47] dev server running: http://localhost:8100/
This is my ionic info
Your system information:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.6
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v7.2.1
Xcode version: Not installed
Not sure whats going on here. I tried reinstalling ionic
and npm_modules
but its not working. Any help? Thanks in advance.
Upvotes: 2
Views: 9199
Reputation: 163
"scripts": {
"build": "ionic-app-scripts build",
"watch": "ionic-app-scripts watch",
"serve:before": "watch",
"emulate:before": "watch",
"deploy:before": "build",
"build:before": "build",
"run:before": "watch"
}
In package.json
change scripts to above and run ionic serve -l
Upvotes: 1
Reputation: 106
Are you sure that you are opening http://localhost:8101/ionic-lab
and NOT just http://localhost:8101
?
ionic serve --lab
or ionic serve -l
http://localhost:8101/ionic-lab
Note
localhost:8101
loads the normal view andlocalhost:8101/ionic-lab
loads the view with options to various platformUpvotes: 9
Reputation: 11
i think ionic serve -l
doesn't work since ionic 2 using
ionic-app-scripts.
while, them using ionic view app, for live test.
check here https://play.google.com/store/apps/details?id=com.ionic.viewapp&hl=en
Upvotes: 0