[Solved] events.js:183 throw er; // Unhandled ‘error’ event Error: listen EADDRINUSE 127….

Problem: when using webpack to package, an error is reported: events.js: 183 thrower// Unhandled ‘error’ event Error: listen EADDRINUSE 127.0.0.1:8888

Error reason: the port number is not occupied

Solution:

1. In the command window:

//Query if the port number used is occupied
netstat -ano|findstr "8888"
//Find the occupied 127.0.0.1:8888 corresponding program id number, e.g. 320, and execute.
tasklist|findstr "320"
//Show the corresponding program name, and end the program process in task manager.

Finally, execute the packing command again

2. After confirming that it is occupied, modify the port number configured in webpack.config.js to an unoccupied port

Similar Posts: