directory

  • Problem description
  • Problem solving
    • 1. Run the CMD
    • 2. Go to the specified directory
    • 3. View the Pids of all ports
    • 4. You can also obtain the PID by locating the port accurately
    • 5. Kill running programs
    • 6. Run the command again

Problem description

When starting a VUE project, the program listens on port 9000, and then starts to report an error saying that the port has been occupied. The problem report error is

Error: listen EADDRINUSE 127.0.0.1:9000

Problem solving

The solution is to put the 9000 port running procedures to kill.

1. Run the CMD

[win] + r (run)–> CMD

2. Go to the specified directory

CMD in the input

cd c:\Windows\System32
Copy the code

3. You can view the Pids of all ports

CMD in the input

netstat -ano
Copy the code

Too much trouble up there?

4. You can also obtain the PID by locating the port accurately

CMD in the input

netstat -ano|findstr  9000
Copy the code

So we know that PID is 8360

5. Kill running programs

CMD in the input

taskkill /pid 8360
Copy the code

If you must force termination, add the /F option

taskkill /F /pid 8360
Copy the code

6. Run the command again

Rerun the program. Success.