Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot GET //__ion-dev-server/ionic_lab.html in ionic 2.1.8

I have updated my local setup such as-

  • ionic
  • cordova
  • npm
    See the system environment available on my machine-

******************************************************

Your system information:

Cordova CLI: 6.4.0 
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.43
ios-deploy version: Not installed
ios-sim version: 5.0.8 
OS: OS X Yosemite
Node Version: v6.2.2
Xcode version: Xcode 7.2 Build version 7C68



******************************************************

after that I run the server by typing-

ionic start

It works but display only one view on browser instead of three (android, ios & windows).
When I use different command to get that all as-

ionic serve --lab (or) ionic serve -l

It just shows error on browser as-

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

I got some questions there in ionic forum but that won't work for me as there was no answer of that.

Hope for help!!!

like image 965
S.Yadav Avatar asked Feb 06 '23 17:02

S.Yadav


2 Answers

Package.json and remove "ionic:serve"

"scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
},

Remove "ionic:serve"

"scripts": {
    "ionic:build": "ionic-app-scripts build"
},
like image 167
Gulab Chand Tejwani Avatar answered Mar 16 '23 08:03

Gulab Chand Tejwani


If I changed Package.json to

"scripts": { "ionic:build": "ionic-app-scripts build" },

The ionic serve --lab will serve, but it will not watch (auto-update when changes are made)

Then I found this solution: Ionic serve –lab don’t work in RC2

I changed Package.json to

"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" },

And ionic serve --lab is now watching(auto-update when changes are made)

like image 40
user2875289 Avatar answered Mar 16 '23 08:03

user2875289