ionic-cli: bug v2: "ionic run browser --livereload" is not refreshing the app after changes
- to reproduce
- run
ionic run browser --livereload
- modify a html or ts file
- expected
- the app should change. Refreshing the browser you should see the changes
- instead
- the console shows that the file changes is being copied by the changes are not reflected in the app. It is still necessary to ctrl+c and restart it
- workaround: after the change, wait until when the console shows the file changed and then
rsync -rtv www/ platforms/browser/www or run another file watcher: fswatch -r www/ | xargs -I % rsync -rtv www/ platforms/browser/www
- workaround 2
./node_modules/.bin/ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 13
- Comments: 28 (3 by maintainers)
From @sebastianovide answer
Workaround: ./node_modules/.bin/ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/buildHe forced the ionic app script to serve and build the
wwwfrom./platform/browserinstead of serving from./wwwfolderfor the shorter command, you can edit the
package.jsonin thescriptskey like this:and then on the terminal, you just need to run
npm run browsernow you got the browser version of your app that compatible with
cordovaWorkaround:
./node_modules/.bin/ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build@jthoms1 I believe we should re-open this issue because it seems this bug still exist in the latest version of the code.
I ran into this issue today with ionic CLI 2.2.1
+1. Also, I’ve double-checked my ionic address. This feature was functioning earlier, but has unexpectedly stopped. Any feedback?
Nope… sorry. It worked well for the first hour and here is the issue again 👎
Having the same issue (‘ionic run browser --livereload’ not reloading on template change):
Cordova CLI: 7.0.0 Ionic Framework Version: 3.1.1 Ionic CLI Version: 2.2.3 Ionic App Lib Version: 2.2.1 Ionic App Scripts Version: 1.3.7 ios-deploy version: Not installed ios-sim version: Not installed OS: Linux 4.10 Node Version: v6.10.2 Xcode version: Not installed
Please, fix this problem, as it severely impedes fast prototyping.
Having the same issue as described an reported by others here.
Having the same issue. Mostly with templates update
Exactly the same with new version
Same issue on ubuntu 16.04:
Cordova CLI: 6.5.0 Ionic Framework Version: 2.0.1 Ionic CLI Version: 2.2.1 Ionic App Lib Version: 2.2.0 Ionic App Scripts Version: 1.1.3 ios-deploy version: Not installed ios-sim version: Not installed OS: Linux 4.4 Node Version: v7.4.0 Xcode version: Not installed
Please install the latest ionic cli. ionic@2.1.12. This has incorporated the test tag branch. Thanks for your patience. If you are still having issues please let me know!
npm uninstall -g ionicnpm install -g ionic@latestSame here
global packages:
local packages:
System:
Same issue than @zixia
I’m having an issue with the project failing to build after making a change in
src/.When I run
ionic run browser --livereload, it builds fine and opens Chrome etc., but after making a change in a html/scss/ts file, it fails like this:update to ionic@latest this fix the issue thankyou!