[v2] ionice run ios --live-reload not reloading on file change
See original GitHub issueThe issue: When I run my project with live-reload the emulator/device is not being updated when I change my source files.
ionic run ios -c --live-reload
Running 'run:before' gulp task before run
[14:26:39] Starting 'clean'...
[14:26:39] Finished 'clean' after 20 ms
[14:26:39] Starting 'build'...
[14:26:39] Starting 'sass'...
[14:26:39] Starting 'html'...
[14:26:39] Starting 'fonts'...
[14:26:39] Starting 'scripts'...
[14:26:39] Finished 'scripts' after 67 ms
[14:26:39] Finished 'html' after 103 ms
[14:26:39] Finished 'fonts' after 110 ms
[14:26:40] Finished 'sass' after 928 ms
[14:26:55] Finished 'build' after 16 s
[14:26:55] Starting 'run:before'...
[14:26:55] Finished 'run:before' after 6.7 μs
Setup Live Reload
Running live reload server: http://10.0.0.120:35729
Watching: www/**/*, !www/lib/**/*
√ Running dev server: http://10.0.0.120:8100
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit
Now, if I change anything in my project (let’s say app/app.ts) the emulator/device does not reload.
I think it’s because the ‘watch’ task in gulp is not being run.
Workaround If I open another terminal window and run this command in my project folder, live reload works as expected:
gulp watch
[14:31:28] Using gulpfile ~/ionic/ionic-projects/PortalShopApp/gulpfile.js
[14:31:28] Starting 'clean'...
[14:31:28] Finished 'clean' after 18 ms
[14:31:28] Starting 'watch'...
[14:31:28] Starting 'sass'...
[14:31:28] Starting 'html'...
[14:31:28] Starting 'fonts'...
[14:31:28] Starting 'scripts'...
[14:31:28] Finished 'scripts' after 80 ms
[14:31:28] Finished 'html' after 109 ms
[14:31:28] Finished 'fonts' after 109 ms
[14:31:29] Finished 'sass' after 1.19 s
7.3 MB bytes written (11.42 seconds)
[14:31:43] Finished 'watch' after 15 s
[14:31:55] Starting 'html'... <--- I changed app/pages/login/login.html and it started 'html' task like expected
[14:31:55] Finished 'html' after 12 ms
This should happen automatically, right?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Ionic live reload feature not reloading application
Try running ionic address and selecting the correct interface. If it doesn't work and it's iOS 9, it may be an issue with...
Read more >Ios device live reload not working - Ionic Forum
Everything loads fine and runs fine the first time I build for my ios device using: ionic cordova run ios --device -l -c....
Read more >Live Reload | Capacitor Documentation
The Ionic CLI includes a complete Live Reload experience, automating all of the steps that are detailed manually below. Install it along with...
Read more >Running React with Ionic Capacitor & Live Reload
Cover image for Running React with Ionic Capacitor & Live Reload ... DiskCookieStorage changing policy from 2 to 0, cookie file: file:/// ...
Read more >Live Reload All the Things: Ionic CLI's Latest Features
Not only can you run LiveReload, you can also access console logs from the device and server logs showing which files the device...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Have the same issue in the emulate command. The changes I make in the app folder are not updated.
I run the command
Nothing is updated. I then have to open a new terminal and run the command
Then all updates are processed correctly.
Thanks for the issue! This issue appears to be associated with an old version of the Ionic CLI. Please update to the latest CLI version, which supports all versions of the Ionic Framework. If the issue is relevant and if it persists after updating to the latest CLI version, please create a new issue.
Thank you for using Ionic!