This article is a mirror article of machine translation, please click here to jump to the original article.

View: 6632|Reply: 0

Run node hint :events.js: 160 throw er; // Unhandled 'error' event

[Copy link]
Posted on 12/6/2018 4:01:04 PM | | |
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.




Previous:gitbook-plugin-timeline timeline bug fix
Next:Some problems with Alipay payment asynchronous callback
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com