Source:  Twitter logo

Backend: Express server, with npx create-express-api backend

Frontend: Next.js, with npx create-react-app frontend

I have implemented these command in my root folder and trying to run npm start xxx to check if they are still working or not. But they are not working in my http://localhost:3000 Though they are working in this link http://172.27.178.192:3000 (on my network) This is the image showing the problem

I have changed browsers and still the same problem is appearing. On the browser it says Unable to connect Firefox can’t establish a connection to the server at localhost:3000.

I think some other application occupied your 3000 port. try find which one is. If you have found then closed and try again.

For instance you want to free the port 3000 Then, follow these commands.

netstat -ano taskkill /f /im [PID of the port 3000 got from previous command]

How to close TCP and UDP ports via windows command line

1 users liked answer #0dislike answer #01
Milán Nikolics profile pic
Milán Nikolics

How to close TCP and UDP ports via windows command line netstat -ano | findstr :8080

Then the pid will appear at the rigth which you can kill with taskkill.

The last number the pid.

then:

taskkill/pid 11704 /F

1 users liked answer #1dislike answer #11
Milán Nikolics profile pic
Milán Nikolics
  1. in browser history search for localhost:3000 and delete all of them.
  2. make sure you closed all terminalls(check vscode too) and all tabs in your browsers.
  3. in new widnows terminal npx kill-port 3000 do it in WSL2 terminall too.
  4. make sure your firewall is turn of.
  5. restart you computer.
-1 users liked answer #2dislike answer #2-1
sarem eskandary profile pic
sarem eskandary

Copyright © 2022 QueryThreads

All content on Query Threads is licensed under the Creative Commons Attribution-ShareAlike 3.0 license (CC BY-SA 3.0).