Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
243 views
in Technique[技术] by (71.8m points)

json - Node events.js:167 throw er; // Unhandled 'error' event

I'm trying to use JSON Server in a React App. However, I keep getting the following error.

events.js:167
  throw er; // Unhandled 'error' event
  ^
Emitted 'error' event at:
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1498:12)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:50:17)

I've upgraded npm and node to the latest versions. I've killed all processes with killall node and sudo killall -9 node

Any ideas what may be causing the issue?

question from:https://stackoverflow.com/questions/50782463/node-events-js167-throw-er-unhandled-error-event

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I had the same issue I ran killall node then npm start after that my local server at port 5000 worked again. Hope that helps you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...