aspnet / JavaScriptServices

[Archived] This repository has been archived
Apache License 2.0
3.04k stars 518 forks source link

[HMR] Cannot check for update (Full reload needed) after angular error #1279

Closed ksstott closed 7 years ago

ksstott commented 7 years ago

I am getting the following warning when an error is made in the angular code. Obviously the second error is useful and is telling me that I have used a html element that angular does not understand however the first line seems incorrect and the HMR is broken from this point on wards (i.e. the code does not auto reload when I correct the angular error)

image

I am not sure when this started happening however I can reproduce it with the latest AspNetCore2.0 angular template and I can replicate it on a solution I have based on an older AspNetCore1.1 template from several months ago. I am certain that the code did not formally behave like this and that in this situation the screen would have been greyed out with a list of errors on the screen (as well as in the console error). Once the errors were fixed the HMR would have continued to operate and the code would have been rebuilt and the site continue to work.

I have a feeling that this may have broken for me in the last few days because I have only noticed it yesterday but I could have just not noticed it. Any ideas as to what this problem is?

SteveSandersonMS commented 7 years ago

Some kinds of errors effectively kill the HMR system, which means you need to fix those errors and manually reload the page in the browser to get back to a working state where HMR operates normally again. It looks like this is one of those cases.