RC0 - Livereload android not working


#1

Hi all,

I just updated our app to RC0 and the performance is much better, I have a problem with --livereload. When i run :
ionic run android --target=DEVICEID -l -c

when i change anything in the .ts files, it doesn’t reload but i tried changing main.js file and it reloads the compiler.

any ideas ?

my ionic info :

Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X Yosemite
Node Version: v6.7.0
Xcode version: Xcode 6.2 Build version 6C131e


#2

Same issue here, please help if anyone solved this problem


#3

The livereload isn’t working even on the Chrome browser here.

Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.2.2
Xcode version: Xcode 8.0 Build version 8A218a


#4

Same problem on all platforms.


#5

Same issue here

Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v4.4.7
Xcode version: Xcode 7.3.1 Build version 7D1014


#6

ionic team please help us solve this problem, we use google map native for our app and we are stuck with this update its been 2 days that we wait 40 seconds every time we update a single line of code. I think this post and RC.0: how do you use the Chrome Debugger with the Rollup bundler? are the most important topics right now

Thanks a million


#7

Hi,

Temporarily you can have 2 terminals opened, one with the next command

ionic serve

And another with the next command

ionic run android -l -target=“your target”

when the first command is executed main.js is updated and the emulator | device is reloaded.

Only temporarily.


#8

Yes, I have also same issue in RC0…


#9

Up this post… livereload not working for me either


#10

another workaround… i found out that, for ionic run, the watch command is actually not getting triggered… meanwhile, for serve, its always on… Im afraid they might missed to listen for livereload option and adding watch command where required…

so, i end up adding another scripts command to package.json to make sure watch is triggered when running ionic run… but this will enforce watch in both development and production… (maybe not, I’m not sure how this works) so, maybe you want to add some environment detection there…

here my npm scripts…

    "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",
        "run:before": "watch"
      }

Added "run:before": "watch" at the end of the scripts command list


#11

another option would be to open up a new terminal and manually run watch

npm run-script watch


#12

modify the scripts of the package.json like this:
“scripts”: {
“build”: “ionic-app-scripts build --dev”,
“watch”: “ionic-app-scripts watch”,
“serve:before”: “watch”,
“emulate:before”: “build”,
“deploy:before”: “build”,
“build:before”: “build”,
“run:before”: “build”,
“run:before”: “watch”
}

add --dev in the “build” for fast reload (like before rc0) and the “run:before”:“watch” to activate the --livereload.

I made this changes and now is working just like before rc0.


#13

I try that but each time when I set --dev, I have a blank screen :frowning: