Ionic-app-scripts: [0.0.42] ionic serve parameters not working

Created on 10 Nov 2016  路  9Comments  路  Source: ionic-team/ionic-app-scripts

Short description of the problem:

I upgraded to ionic-app-scrips 0.0.42 as described in the CHANGELOG.md and noticed, that ionic serve --platform ios|android and ionic serve --lab aren't working anymore (the URL is http://localhost:8100 instead of http://localhost:8100/?ionicplatform=ios).

Edit: It seems that other parameters are affected as well (see comments below).

It works perfectly fine when I use the old scripts in package.json, even with ionic-app-scripts 0.0.42:

...
"scripts": {
    "build": "ionic-app-scripts build",
    "watch": "ionic-app-scripts watch",
    "serve:before": "watch",
    "emulate:before": "build",
    "deploy:before": "build",
    "build:before": "build",
    "run:before": "build"
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
...

What behavior are you expecting?

ionic serve --platform ios|android and ionic serve --lab should open the browser with the desired platform(s).

Which @ionic/app-scripts version are you using?
0.0.42

Other information:

System information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.7
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.42
ios-deploy version: 1.9.0
ios-sim version: 5.0.9
OS: macOS Sierra
Node Version: v7.0.0
Xcode version: Xcode 8.1 Build version 8B62

Most helpful comment

The parameter "-b" also stopped working

All 9 comments

The parameter "-b" also stopped working

Parameter -c (consoleLogs) also

You can use all the old parameters in your package.json's scripts, like this:

...
"scripts" : {
  "ionic:build": "ionic-app-scripts build",
  "ionic:serve": "ionic-app-scripts serve -b -c --lab"
}
...

All possible parameters are listed here.

all are stop, nothing working now!

We can no longer enter 'q' to stop the server. Must press ctrl-c. Is this by design?

We are aware of these issues and are discussing how we want to move forward. We know we need to get --lab working and we are also working on getting live reload working on device working too.

Thanks,
Dan

@danbucholtz - localhost:8100/ionic-lab is not accessible anymore!

The latest CLI (2.1.8) should support passing of parameters such as --platform. Also the issues with lab are resolved in commit 1d99a9868edb11cc15b999ef6dda76c65f59b036. In the mean time to access lab you can update the browser url location to be /__ion-dev-server/ionic_lab.html

We released a more recent CLI that fixes these issues. Please ensure to install 2.1.12.

npm install -g ionic@latest

Was this page helpful?
0 / 5 - 0 ratings