When running node, I encountered the following prompt:
events.js:160 throw er; // Unhandled 'error' event或者events.js:160 throw er; // Unhandled 'error' event ^ Error: listen EADDRNOTAVAIL 172.16.1.228:3003。
The program was running well, and once it was prompted to us when it started, and the answer was that this port was occupied and replaced with another port. Then there is a series of solutions.
Let's talk about how I solved this problem:
1. I changed the port, there is no effect, and there is still the above prompt.
2. Check the processes currently occupied by the port, but no one is found.
3. All parameters of the listening function have been written completely. The IP address is my local IP address. I really wonder what went wrong.
4. I found the answer from stactoverflow and said to reinstall the node under the entire node_modules folder, I gave up after reading it, I used a lot of packages in it, and I don't know what problems I encountered when I rebuilt it.
5. In desperation, the local IP in the listening address in the program was replaced with 127.0.0.1. Damn! It was actually a success. I wondered, is this teasing me? Then decisively looked at the local IP on the computer, stupid again, I'll go! My local computer IP has changed, no matter how you say it's changed! Well, I see, changing the IP address in the program to 127.0.0.1 is the most reliable. |