You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like the typescript isn't getting compiled. I edit the typescript (introduce a function) and adjusted the template so that it would refresh. The new function doesn't get called (when clicking on a button to trigger the method) after the page refresh.
Instead get an error saying that the function doesn't exist.
Stopping ng serve and restarting it will recompile the typescript and suddenly the function exists.
Same issue here. I just tried uninstalling/reinstalling everything and running ng update, no change. Still seeing old .ts code until I stop and restart ng serve
Can you try npm install --save @ngtools/webpack@1.2.4 to see if that fixes the issue?
Reacted by Mateen Kadwaikar, Matjaz Hirschman, slubowsky, Anders Austad, Ernesto, Arthur Melo, Bruno Morceli, Rafael Gutierrez Gaspar, Dino, Bruno Fernando Corrêa de Abreu and 1 more
Reacted by shriram9494, Majid Khoshnasib, Aleksandar Savic, Bharath3981, muzslaiz, Nathan Daugherty and amorel
Using Angular 4.0.2, it seems that the 'rebuild on change' does not work if the project path contains '('. Potentially other legal characters could also have this impact.
I am facing the same problem now. @angular/cli: 1.2.0
It detect the changes on .ts and html files, it says that it's compiling, the browser refreshes but nothing change. I can delete everything from many .ts files and it don't even show an error. Only way to see the changes is stopping and ng serve again
I have noticed this on VS2017 15.7.1 ,dotnet core 2.1 and Angular/Angular-CLI ^6.0.3
(I removed webpack from packages completely - The angular add new does not use it so I nuked it too based on the dotnet core 2 template based on angular 5 (not the dot net core 1 template based on angualr 4))
It was not refreshing my page from VS but when I did a ng serve it worked as expected.
I noticed in VS that even on refreshing and I made changes they did not appear.
I looked in the output for ASP.NET Core Web Server
** Angular Live Development Server is listening on localhost:50273, open your browser on http://localhost:50273/ **
This WAS not the port VS studio opened for me
When I went to this PORT it was changing fine
I realised it was serving an old build for some reason. Where does dotnet core serve build from? the /dist directory obviously.
I deleted everything in the /dist directory.
Refreshed the page on the port VS gave me and bam! It started working again with auto rebuild and auto refresh.
I think if something is in the dist folder then dotnet will NOT proxy to the CLI server. Make sure its clean
Reacted by Agustin, kilanny, pwinstead, kakins, Rodrigo Porcionato, Piotr Kula, Julie McFadden, JMarchettiSabra, Italo Vinicios, antkers and 1 more
@ibraheemalkilanny Turning on the "Disable cache (while DevTools is open)" setting in the Chrome Developer Tools (F12 to open Dev Tools, then F1 to open settings page) resolved the issue for me.
I have noticed this on VS2017 15.7.1 ,dotnet core 2.1 and Angular/Angular-CLI ^6.0.3
(I removed webpack from packages completely - The angular add new does not use it so I nuked it too based on the dotnet core 2 template based on angular 5 (not the dot net core 1 template based on angualr 4))
It was not refreshing my page from VS but when I did a ng serve it worked as expected.
I noticed in VS that even on refreshing and I made changes they did not appear.
I looked in the output for ASP.NET Core Web Server
** Angular Live Development Server is listening on localhost:50273, open your browser on http://localhost:50273/ **
This WAS not the port VS studio opened for me
When I went to this PORT it was changing fine
I realised it was serving an old build for some reason. Where does dotnet core serve build from? the /dist directory obviously.
I deleted everything in the /dist directory.
Refreshed the page on the port VS gave me and bam! It started working again with auto rebuild and auto refresh.
I think if something is in the dist folder then dotnet will NOT proxy to the CLI server. Make sure its clean
Activity
trevor-hackett commentedon Feb 1, 2017
That's weird I just created a new project with 1.0.0-beta.28.3 and it is refreshing just fine.
web-dave commentedon Feb 1, 2017
Yes. I just did a
npm i -g angular-cliandng new blaweb-dave commentedon Feb 1, 2017
I double checked it already
And I restarted my machine
trevor-hackett commentedon Feb 1, 2017
I can confirm. When editing the typescript it doesn't refresh. If you update the template, it refreshes.
web-dave commentedon Feb 1, 2017
I just unistalled it and reinstall it so I'll go back to previous, have to do a workshop tomorrow and need cli :(
trevor-hackett commentedon Feb 1, 2017
Looks like the typescript isn't getting compiled. I edit the typescript (introduce a function) and adjusted the template so that it would refresh. The new function doesn't get called (when clicking on a button to trigger the method) after the page refresh.
Instead get an error saying that the function doesn't exist.
Stopping
ng serveand restarting it will recompile the typescript and suddenly the function exists.joshorvis commentedon Feb 1, 2017
Same issue here. I just tried uninstalling/reinstalling everything and running ng update, no change. Still seeing old .ts code until I stop and restart
ng servebeeman commentedon Feb 1, 2017
Can you try
npm install --save @ngtools/webpack@1.2.4to see if that fixes the issue?web-dave commentedon Feb 1, 2017
Thx, that's it.
joshorvis commentedon Feb 2, 2017
@beeman - that worked for me too, thanks!
fix(@ngtools/webpack): change of CSS no longer breaks rebuild
fix(@ngtools/webpack): change of CSS no longer breaks rebuild
fix(@ngtools/webpack): change of CSS no longer breaks rebuild (#4334)
web-dave commentedon Feb 2, 2017
I have the same issue with beta 29. This time it doesn't solve to install ngtools/webpack
fix(@ngtools/webpack): change of CSS no longer breaks rebuild (angula…
nisserne commentedon Apr 19, 2017
A late comment from a newbie.
Using Angular 4.0.2, it seems that the 'rebuild on change' does not work if the project path contains '('. Potentially other legal characters could also have this impact.
adrianolsk commentedon Jun 30, 2017
I am facing the same problem now.
@angular/cli: 1.2.0It detect the changes on .ts and html files, it says that it's compiling, the browser refreshes but nothing change. I can delete everything from many .ts files and it don't even show an error. Only way to see the changes is stopping and ng serve again
p10tyr commentedon May 23, 2018
I have noticed this on VS2017 15.7.1 ,dotnet core 2.1 and Angular/Angular-CLI ^6.0.3
(I removed webpack from packages completely - The angular add new does not use it so I nuked it too based on the dotnet core 2 template based on angular 5 (not the dot net core 1 template based on angualr 4))
I realised it was serving an old build for some reason. Where does dotnet core serve build from? the /dist directory obviously.
I deleted everything in the /dist directory.
Refreshed the page on the port VS gave me and bam! It started working again with auto rebuild and auto refresh.
I think if something is in the dist folder then dotnet will NOT proxy to the CLI server. Make sure its clean
kilanny commentedon Aug 16, 2018
@ppumkin I have this issue too. This needs to be reported to Microsoft.
apoblock commentedon Aug 20, 2018
@ibraheemalkilanny Turning on the "Disable cache (while DevTools is open)" setting in the Chrome Developer Tools (F12 to open Dev Tools, then F1 to open settings page) resolved the issue for me.
Hypenate commentedon Aug 22, 2018
I was having the same issue, I resolved my issue by:
Updating all NuGet packages (I was running things in Visual Studio).
Updating all packages via
ng update --all(that is if you are lucky), I had to update the core first and then find my way trough the rest.Then I do a
ng build --prodbecause some issues are only discovered then.Then an
ng serve(I think this is not necessary)Delete the files from the dist folder
rodrigoporcionato commentedon Oct 15, 2018
Hi, This workaround worked perfecte for me!
id1945 commentedon Nov 7, 2018
I have this issue too.
svassr commentedon May 16, 2019
For me it's when I edit component styles (*.scss) that it won't refresh.
@angular/cli": "^7.3.9
@ngtools/webpack@7.3.9
angular-automatic-lock-bot commentedon Sep 9, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(@ngtools/webpack): change of CSS no longer breaks rebuild (angula…