-
Notifications
You must be signed in to change notification settings - Fork 305
Code changes are not reflected after a live reload - ionic serve #363
Comments
When you see this happen, can you manually reload the page and verify if the expected code is there or not. Maybe this is a race condition with I cannot recreate this on Windows 7. Thanks, |
this happens in my home computer too which is windows 8.1 |
@danbucholtz , |
Thanks for validating. It sounds like a race condition, we'll investigate. Thanks, |
thank you, weird notes from my observations, 1.change js file 1.change html 1.change js file |
FWIW I'm seeing the same behavior as @comfortme |
Okay, there is definitely something wrong, then. We'll figure it out and fix it. Windows 10, right? I have never seen that behavior on Mac OS or Windows 7/8. Thanks, |
Confirm that I see this on Windows 10, not sure if it happens every time but changing the JS sometimes needs another save for the change to be reflected, build output looks like this: [13:35:19] build started ... Bonus bug, the C in Cordova is missing when running 'ionic info'): Your system information : ordova CLI: 6.3.0 |
Yes, I'm on Windows 10 as well. |
@joshgarwood, @webprofusion-chrisc, Any idea what's causing this? I cannot recreate on Windows 10 or windows 7. Both are VMs - not sure if that would have any impact. Any idea how I can recreate this? Is there anything unique about your set-up? Do you have SSDs? I am noticing the build times seem a little slow - wondering if the file Please let me know if you have any ideas. Thanks, |
Hey @danbucholtz .. Unfortunately I have no idea, ha. I can say that it happens most typically if I try to save multiple times in succession. So if I have 3 unsaved changes across 3 different files, and do It's still random overall, but your best chance at duping it (from my experience) is to make multiple saves in close succession. Thanks again for looking into this; it'll definitely save me some pain and frustration once it's fixed, ha. |
I am experiencing that same issue on Windows 10 with an SSD. I noticed that build times tend to get worse over time after a few builds. I am use Visual Studio Code.
|
I have an SSD as well. |
Any thoughts on what it might be? Does it happen every time you save an individual file? Does it happen every time you save multiple files? Any info will help me track it down. Thanks! |
I'm also experiencing this issue
|
@danbucholtz I have been testing for a while and it looks like a race condition but I cannot seem to find a pattern. It looks as though sometimes the webpack update task is triggered before transpile has finished and therefore it does not see the newly generated js (but I am not certain about that either). |
As of Version 0.0.44 this Problem seems to be gone, at least for me |
yes it seems it's gone for me too with 0.0.44. |
Unfortunately I keep seeing this issue with 0.0.44 |
There is definitely an issue with updating templates that I am fixing today. It was a regression in a large refactor we did a week or so ago. Have any of you seen instances where Typescript code changes don't get put into the bundle? I believe so, but I have never been able to recreate it. Thanks, |
@danbucholtz Yes, that is exactly what's happening I believe. Whenever I inspect the code with Chrome tools the changes are not there. |
@arielfaur, can you recreate this with the latest version of app-scripts?
Thanks, |
@danbucholtz I created a brand new Ionic project and it all started working. It seems that dependencies were somehow messed up, even after wiping the |
For what it's worth, I've got app-scripts working with webpack etc. But livereload just doesn't work for me at all. I just get an empty white screen with no console logging (My first line in my bootstrap class is a console.log (main.dev)). I do see this all the time:
one out of like 20 runs, it actually does live-reload a few times. It's absolutely random for me and this error is always there after the initial build (live-reload). Oh I'm not on windows: OSX sierra |
Curious, I see awesome-typescript-loader in there but we don't use awesome-typescript-loader. What are you doing in your project? Thanks, |
@danbucholtz To be honest I don't know the difference, was just expecting Awesome loader to have more features. I didn't really think that through. I had a lot of troubles to get my project to compile and when it worked I just switched to awesome ts. I'll report back after changing it to see if that causes problems. |
@danbucholtz It does recompile now it however seems to fail on cordova plugins like my fabric one, only on reload not on initial. Maybe I can just fix that though. Thanks for the assist. Typescript Error |
its too much irritating. sometimes the functions don't load, sometimes the providers doesn't load. Please let us know a solution. Thanks |
Please, @danbucholtz, reopen this issue. It is still happening. |
yes still happening .show errors in old codes.sometimes i have to stop and serve again |
Know what? |
None of the above tips helped unfortunately, but what I've found is that there's something wrong with After further digging I managed to short-term solve the problem by commenting out the assets cached in |
@tomavic Thanks, I solved this on linux by installing npm install ws@3.3.2 --save-dev --save-exact and when I ran ionic serve I got this message:
And finally solved this by running: Found this fix here: https://stackoverflow.com/questions/16748737/grunt-watch-error-waiting-fatal-error-watch-enospc |
me too facing same issue in mac operating system |
Short description of the problem: i am facing an issue on Windows 10
What behavior are you expecting? When saving the changes should be reflected. Steps to reproduce: 1.Run ionic serve then open chrome for localhost:8100 Build Version : cli packages: (C:\Users********\AppData\Roaming\npm\node_modules)
global packages:
local packages:
System:
Environment Variables:
Misc:
Some Errors: This was the error i got -> It was saying that "support()" is not a function . Note : Any help would be Appreciated and Thanks in Advance ^-^ |
I have found this happens most often (at least for me) in providers and global files, and much less so in pages. |
Why is this issue closed? Issue still occurring, particularly when importing components into page modules, the component never updates on the first save, every save has to be done twice. |
You need to put your project files in directory that is completely writable by ionic. Else, it will not work. I got mine working by moving projects to fully writable directory. |
@tomavic -> Working With Me, Thanks |
This is the longest thread I have ever seen! and no one knows if it is a real problem with ionic or no ! At least any new comer should see a consistent solution or know what it's related to ? |
Changes in components are not reflected, no matter how many times I save the file - only .scss file is reflected. I have to manually "ionic serve --no-open" everytime I make a small change inside components. It's annoying. EDIT |
Well It is purely because of ionic not able to write in temp files while doing live reload. So it is becasue of file write permission issue. I have resolved the problem by giving file permissions to 777. |
Same here. Changing something in .html or .ts triggers new build, but the changes are not part of what Ionic serves. Even if I change both .ts and .html at the same time. It makes no difference which browser I use. Also reloaded doesn't help. All proposed solutions didn't work either. I'm on Windows 10 Enterpris v1709 x64, Ionic 3.9.2, Ionic App Scripts 3.1.6, Angular Core 5.1.2 and Node 10.9.0 |
Experiencing the same issue with Ionic 3.9.2 on Windows 10. |
Verified in windows 10 here is the details for my environment
|
The same problem with a clean installation on ubuntu and ionic, solve it using this code: |
How can that be done on windows?
Thanks
Craig Deeming
…On 1 October 2018 at 16:08, Alain ***@***.***> wrote:
The same problem with a clean installation on ubuntu and ionic, solve it
using this code:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf &&
sudo sysctl -p
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#363 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABOJBNJ6kGqJ0eYARpDiqzJpHnqRdNvAks5ugi_YgaJpZM4Kvd9O>
.
|
I have the exact same problem (2 years later...?): I save, the "quick build" starts, my page refreshes, but with the old code. I have to re-refresh the page to get the new code. This happens every time. Is there maybe a way to delay the "watch", like nodemon's "delay" option? Note that, for a brief period, I've had the same behavior with Node (another project, without Angular) when I switched to VS Code. It seems to have disappeared though. MacOS 10.10.5, ionic-angular 3.9.2, VS Code, Chrome. |
i solve the problem using alainm23 comment, but changed the last -p to -a echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -a |
I try to look into MacOS Sysctl to find where we can increase the number of event watch by a user as per @lesgilles comment but I cant find the one. Any idea? |
I was using ionic capacitor and re initialized capacitor with these steps - https://capacitor.ionicframework.com/docs/getting-started/with-ionic/ I then re ran npx cap copy and npx cap update and re ran electron in chromium and everything copied over. |
hey did you find a solution?? |
hey! did you find any solution please help! |
RohanBolusani This is a little embarrassing to admit but my issue was that I had made another copy of my project in another location and that I was editing the wrong copy so I couldn't see my edits. Try clearing your cache and service workers in whatever browser you use. Then rebuild your project ensure that the updated code was saved first and reserve your build after completing these steps. Let me know if you still have issues. |
omg! same thing! how could have i done that lol! |
Short description of the problem:
with ionic serve and chrome as browser, after saving the changes, live reload is triggered, code rebuilds, browser reloads but the changes are not reflected. i see the previous build. Have to save twice to make the changes updated in browser.
this problem does not happen every time though.
i dont know what causes this but it happens 1/3 of my saves.
What behavior are you expecting?
When saving the changes should be reflected.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: