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

前端 未结 19 1975

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
  ^
Emitt         


        
相关标签:
19条回答
  • 2020-12-23 20:56

    Your site is running at http://localhost:8000 Try changing your port. Like 3000 or 8080.

    app.listen(3000)

    My 8080 post was taken, so I got this same error

    0 讨论(0)
  • 2020-12-23 20:59

    Removing the node_modules directory and reinstalling again using npm install should solve the problem.

    0 讨论(0)
  • 2020-12-23 21:00

    Try npm start as superuser: sudo npm start

    This worked for me.

    0 讨论(0)
  • 2020-12-23 21:00

    update severless with npm. This will resolve it.

    0 讨论(0)
  • 2020-12-23 21:01

    restart the WebStorm was worked for me. instead of removed 'node_modules' folder and reinstall modules by npm install.

    0 讨论(0)
  • 2020-12-23 21:04

    Perhaps you started the echo server elsewhere with same port.

    0 讨论(0)
提交回复
热议问题