Node.js – events js 72 throw er unhandled 'error' event

后端 未结 6 1584
攒了一身酷
攒了一身酷 2020-12-04 14:19

I\'m new to Node.js and wish to run a program using streams. With other programs, I had to start a server simultaneously (mongodb, redis, etc) but I have no idea if I\'m sup

6条回答
  •  粉色の甜心
    2020-12-04 14:47

    Close nodejs app running in another shell. Restart the terminal and run the program again.


    Another server might be also using the same port that you have used for nodejs. Kill the process that is using nodejs port and run the app.

    To find the PID of the application that is using port:8000

    $ fuser 8000/tcp
    8000/tcp:            16708
    

    Here PID is 16708 Now kill the process using the kill [PID] command

    $ kill 16708
    

提交回复
热议问题