0

error listen eaddrinuse: address already in use :::8081
Error: listen EADDRINUSE: address already in use :::8081

at Server.setupListenHandle [as _listen2] (node:net:1372:16)  
at listenInCluster (node:net:1420:12)  
at Server.listen (node:net:1508:7)  
at D:\RND\Mobile\node_modules\metro\src\index.js:164:16  
at new Promise (<anonymous>)  
at Object.exports.runServer (D:\RND\Mobile\node_modules\metro\src\index.js:163:10)  
at async Object.runServer [as func] (D:\RND\Mobile\node_modules\@react-native-community\cli-plugin-metro\build\commands\start\runServer.js:121:26)
at async Command.handleAction (D:\RND\Mobile\node_modules\@react-native-community\cli\build\index.js:192:9)

info Run CLI with --verbose flag for more details.

Nagaraj sk
  • 71
  • 8
  • Does this answer your question? [Node.js Port 3000 already in use but it actually isn't?](https://stackoverflow.com/questions/39322089/node-js-port-3000-already-in-use-but-it-actually-isnt) – sha'an Sep 05 '22 at 09:44

1 Answers1

1

You have an active process on that port

You should either change the port or find and kill the active process

netstat -aon | find "8081"

and when you find the PID of the process you can do

taskkill /F /PID <PID>
R4ncid
  • 6,944
  • 1
  • 4
  • 18
  • if i run this command in vscode it shows: $ netstat -aon | find "8081" find: ‘8081’: No such file or directory – Nagaraj sk Sep 05 '22 at 14:39
  • those are command for the windows terminal I don't know what kind of terminal vscode uses. Try those command in the command prompt or windows powershell – R4ncid Sep 05 '22 at 15:27
  • yes this command works in command prompt, thanks for your support – Nagaraj sk Sep 06 '22 at 09:33