本文介绍了节点events.js:167 throw er; //未处理的“错误"事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在React App中使用JSON Server.但是,我不断收到以下错误.
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)
我已经将npm和node升级到了最新版本. 我已经用killall节点和sudo killall -9节点杀死了所有进程
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?
推荐答案
在端口5000的本地服务器再次运行后,我遇到了相同的问题,先运行killall node
然后运行npm start
.希望对您有帮助.
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.
这篇关于节点events.js:167 throw er; //未处理的“错误"事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!