I am using visual studio code as my code editor for my angular application. Everything was perfectly fine and suddenly out of no where I am facing the following 2 issues.
- When Command
ng serve
is run in the terminal I am getting√ Compiled successfully.
message. Then I open the port 4200 and run the application. The application is opened there but the last changes are not reflected there.- When I do changes in my code and save it, compilation is not happening in the terminal.
Both of the above issues were not there just an hour before. Whatever changes I am doing with my code I am not able to get the view in the browser. Do I need to reinstall the VS code? I have restarted my system ,updated vs code still no change. Please help me out if there is something I am missing
Detailed information about Visual Studio Code
Version: 1.73.1 (user setup)
Commit: 6261075646f055b99068d3688932416f2346dd3b
Date: 2022-11-09T04:27:29.066Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No
2
Answers
Have you tried clearing your browser cache? I would give it a hard refresh (ctrl + f5 in case anyone needs it) just to rule it out. Sometimes its the simplest things that cause the biggest headaches.
It’s unlikely that you need to reinstall VS Code. Sometimes, the
ng engine
simply gets stuck and needs to be bumped to restore proper functionality.I’m assuming that you didn’t introduce this condition by applying incompatible update(s)/upgrade(s) to your angular modules. If you did, then you’ll want to back those out and figure out where the incompatibility occurs.
Barring all that, you should only need to:
ng serve
again.If that doesn’t work, then close all instances of your browser, then go through the above steps again.
At worst, simply reboot your computer.