Hello,
I install: npm install -g ionic
and create new project: ionic start TEST blank --v2
When i run application: ionic run android -l and change html content, ionic non recompile html and livereload not work. I have not errors in console.
I try to update: npm install ionic@latest -g and npm install @ionic /app-scripts@latest --save-dev
but i have the same problem.
How can i resolve this issues?
Thank you!!!
I have answered this issue before. And it still persist to this day. You can basically add "run:after":"watch"
command in your scripts list in package.json for now.
Ok, i made it to work by changing run:before to run:after
"build:before": "build",
"run:before": "build",
"run:after": "watch"
But, really, am I the only one whose “watch” not getting triggered on livereload?
They dont recommend using live reload. I dont know how am i supposed to develop without livereload anyway. It would be a pain to manually rebuild everytime.
@symphony86 ,
We don’t recommend using the -l flag right now. It is still a work-in-progress.
In you’re above example, you’re using the watch task it looks like which will watch files and rebuild (which it did successfully) but there isn’t a server associated with that yet. We are working on a serve task right now.
Ultimately, developers will still use ionic serve and ionic run but the underlying implementation will be much simpler than it is today.
Thanks,
Dan
Try it:
ionic run -l -c -s --debug --device
4 Likes
Can you tell me how you add this workaround? I am having the same problem!
open up package.json… add “run:after”:“watch” as another entry to “scripts” list…
Note: this will enforce watch regardless whether you use --livereload or not
// package.json
...
"homepage": "http://ionicframework.com/",
"private": true,
"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:after": "watch"
},
"dependencies": {
"@angular/common": "2.1.1",
"@angular/compiler": "2.1.1",
"@angular/compiler-cli": "2.1.1",
...
1 Like
Still now working, i don’t know what happened