-
Notifications
You must be signed in to change notification settings - Fork 4
Troubleshooting Guide
This guide will help you resolve some of the common issues encountered while running the DevCamper project. Each section provides step-by-step instructions to diagnose and fix problems.
If you're developing the DevCamper project, you might encounter situations where port 3000 (commonly used for the React frontend) or port 5000 (commonly used for the API backend) is already in use by another process. Below are steps for MacOS/Linux, Windows, and PowerShell to identify and stop the processes occupying these ports.
-
Find the Process ID (PID) of the process occupying the port.
- For port 3000, run:
lsof -i :3000
- For port 5000, run:
lsof -i :5000
This will return output that includes a
PID(Process ID). - For port 3000, run:
-
Kill the process using the PID.
- Once you've found the
PIDfrom the output, kill the process by running:kill -9 <PID>
Example:
kill -9 12345 - Once you've found the
-
Find the Process ID (PID) of the process using the port.
- For port 3000, run:
netstat -ano | findstr :3000 - For port 5000, run:
netstat -ano | findstr :5000
This will return a list with the
PIDof the process. - For port 3000, run:
-
Kill the process using the PID.
- Once you've got the
PID, you can kill the process by running:taskkill /PID <PID> /F
Example:
taskkill /PID 12345 /F
- Once you've got the
-
Find the Process ID (PID) of the process using PowerShell.
- For port 3000, run:
Get-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess
- For port 5000, run:
Get-Process -Id (Get-NetTCPConnection -LocalPort 5000).OwningProcess
This command will return the
PID(Process ID) along with the details of the process. - For port 3000, run:
-
Kill the process using PowerShell.
- Once you've found the
PID, you can kill the process by running:Stop-Process -Id <PID> -Force
Example:
Stop-Process -Id 12345 -Force
- Once you've found the
(You can add more sections for different common problems in this part of the Troubleshooting Guide.)
By following these steps, you can free up the ports and rerun your frontend or backend server without conflicts.