1. Error description
events.js:167
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::3000
at Server.setupListenHandle [as _listen2] (net.js:1286:14)
at listenInCluster (net.js:1334:12)
at Server.listen (net.js:1421:7)
at Object.<anonymous> (F:\Hworkspace\ES6\app.js:5:4)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
Emitted 'error' event at:
at emitErrorNT (net.js:1313:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
2. Error reason
Since you are running node. js, port 3000 is already listening. If you run it again, an error will appear (it was not closed before).
const http = require('http')
http.createServer((req,res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end("huhu");
}).listen(3000);
3. Solutions
Close the previous process first, and then rerun it
Read More:
- listen EADDRINUSE 127.0.0.1:3000
- Error starting userland proxy: listen TCP 0.0.0.0:9000: Listen: address already in use
- Error: listen eadrinuse::: 8000 solution
- Nodejs exception error: listen eacces 127.0.0.1:8000
- Error: listen eadrinuse: address already in use
- filezilla Failed to create listen socket on port 21 for IPv4 solution
- Error: listen eaddnotavail: address not available
- Vue start error: listen eadrnotavail
- Error: listen EADDRNOTAVAIL: address not available 192.168.43.149:8002
- The Tomcat connector configured to listen on port 7014 failed to start
- Some error occurred error: listen eaddinuse: address already in use 127.0.0.1:3000
- The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in u
- Error receiving broadcast Intent { act=com.supersdk.listen.PayListen_defeat flg=0x10 (has extras)
- Solution to the problem that listen TCP 0.0.0.0:3306: bind: address already in use port is occupied in Linux centos7
- Box mount Cody_ How to listen to Pandora in Cody
- Events.js:167 throw er appears when starting node service under linux; // Unhandled ‘error’ event solution
- Node start – create a server listening port.
- Error: Cannot find module ‘process-nextick-args’
- Error reported after moving or copying Vue items: cannot find module ‘xxx‘
- Error: Cannot find module’webpack/bin/config-yargs’ solution