Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create-react-app - Why localhost is not working?

Tags:

reactjs

After creating a new react app using create-react-app, once I start the dev server via npm start, the server started and shows this:

enter image description here

I'm sure that until last week I could open http://localhost:3000 to see the new created app in browser, but now it doesn't work any more and shows this:

enter image description here

But, it works if I open http://192.168.119:3000

I haven't changed anything inside my .hosts file.

Does any one know why I cannot use http://localhost:3000 any more?

like image 332
user1941537 Avatar asked Mar 04 '23 01:03

user1941537


2 Answers

Thanks for your help guys. After emptying the browser cache and flushing the DNS it's now working again.

like image 107
user1941537 Avatar answered Mar 11 '23 00:03

user1941537


I had a similar problem, and checked that my VPN ( I use warp) is turned off already. However, when I turned it on, my local worked again.

like image 28
M.Yavuz YAĞIŞ Avatar answered Mar 10 '23 23:03

M.Yavuz YAĞIŞ