ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Live reload doesn't work

Open devcer opened this issue 9 years ago • 24 comments

Description: ionic serve or ionic serve -r or ionic serve --livereload-port doesnt refresh the build when any HTML or ts file is changed

Steps to Reproduce: Do ionic serve and change any html or ts file

Example repo: N/A

My ionic info: cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 7.0.1 

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : browser 4.1.0
Ionic Framework    : ionic-angular 3.6.0

System:

Android SDK Tools : 26.0.2
Node              : v8.4.0
npm               : 5.3.0 
OS                : Linux 4.10

devcer avatar Sep 08 '17 08:09 devcer

@sdey0081 From what you've described, my guess is you're experiencing an issue with your service worker. To verify, in Chrome debugger, go to Application -> Service Workers and click stop. You should also comment out the service worker in your src/index.html to disable it and verify that live reload is working without it.

If you're new to service workers, you can check out these articles:

  • https://blog.ionicframework.com/service-workers-revolution-against-the-network/
  • https://developers.google.com/web/fundamentals/primers/service-workers/

imhoffd avatar Nov 27 '17 21:11 imhoffd

Same problem happening on Mac OS X. I have provided details in different thread too.

https://github.com/ionic-team/ionic/issues/14431

Please help... Refer to the ionic info outout on above link.

I have too have changed inotify.max_user_watches. But is of no use.

Removed node modules and npm installed with --save still not working.

Regards, Samir

samir-kamble avatar May 07 '18 20:05 samir-kamble

Looks like @samir-kamble resolved those livereload issues by changing file permissions.

imhoffd avatar Jul 12 '18 22:07 imhoffd

Unfortunately there are just so many variables at play here. Many reasons why livereload might not be working. We could compile a troubleshooting guide for livereload (see https://github.com/ionic-team/ionic-cli/issues/3370).

imhoffd avatar Jul 12 '18 22:07 imhoffd