| Error: listen EADDRINUSE means the port you want to assign/bind to your application server is already in use. You can either assign another port to your application. |
This error can be resolved by running the command:
gulp theme:fetch --to
Then use the existing token or create a new token to fetch the theme. If it’s not solved then the following method can be used.
If you want to assign the same port to the app. Then kill the application that is running at your desired port. The process can be killed by using its Process ID.
First, you would want to know which process is using port 3000(example port number). For that use the command below:
sudo lsof -i :3000(use the port number shown in the error message)
This will list all PID listening on this port, once you have the PID you can terminate it with the following:
kill -9 <PID>
where you replace <PID> with the process ID or the list of process IDs, with the previous command output.