events.js: 141 throw er; // Unhandled 'error' event

左心房为你撑大大i 提交于 2019-11-29 23:41:45

Check whether any other Terminal is running other Applications on the same port. This happens when multiple applications trying to access the same port, Its always FIFO.

Good Luck!!!

Vishnu Mishra

First Look for the other applications is running on the same port may be another node application.

To find the current process running on the same port use:

MAC:

You can try netstat

netstat -anp tcp | grep 3000

For OSX "El Capitan" or if your netstat doesn't support -p, use lsof

lsof -i tcp:3000 

Then kill the process

kill pid

You can try to kill all node process use:

killall -9 node

Fixed the problem. There was a problem with the permissions for assets - if gulp can't take all assets. Then always there will displayed an error. I deleted the assets manually. I think i must be careful with(out) the "sudo" - command...

ENOENT means that spawn was unable to find the binary you are looking for. Make sure that what ever you are trying to spawn is in your path.

In this case you probably don't have gifsicle installed.

this would not pertain to your error, but that error code can also run if a person is running node on multiple servers with the same address at the same time from their terminal.

Did you install imagemagick ?

brew install imagemagick

I had this same error at work on my Mac Book Pro. None of the solutions fixed it. I finally fixed the problem by restarting my computer. I often don't shut my computer off at night and put it in sleep mode so if your computer has been running for a long time try restarting it and see if that works for you.

so it throw an error ,Unhandled 'error' event,which means you need handle the error event,add function on this event and print the error,you will find the reason and your program will act normal.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!