I will share with you an issue that occurred while I was developing a new app. When I try to open the new app with the localhost at the port 3000 it always opens the old app :(
You can imagine what I felt, stop the server, and then start again many times and I couldn't believe why the old app continuously appears???
I googled for a solution to kill that old app.
My Sincere friend StackOverflow help me, please then I found a solution. Open cmd and
run netstat -ano | findstr :<PORT> and then a list will appear and you can kill it by
run taskkill /PID <PID> /F
Wow, I killed it. let's try to open our new app in confidence. What???? No, the old app is still alive :(
I tried many other solutions but it is still alive!
Take a breathe and think and think again and suddenly I asked myself what weapons the old app had to beat me in this game?? The old app is a weather app with a manifest file and service worker and cachhhhe. I google again and found this solution. Now -a loud hahaha- I know how to kill it :D
Just by clearing storage from developer tools. What caused the issue is that chrome was loading cached files for the old app. So every time I tried to open at the port 3000 it was opened from caches.
Thanks for reading! If you meet a similar issue leave a comment and share how you did solve it.
Don't forget to follow me to get real programming problems that you may face and get solutions for them.
Hope this article helps, feel free to share it with your friends, any feedback will be appreciated :)