Reputation: 21
When Starting my app this error is coming somebody please help
Getting this error[node js][1]
error listen EADDRINUSE: address already in use :::19000.
Developer tools running on http://localhost:19002
Opening developer tools in the browser...
› Opening exp://192.168.43.102:80 on Pixel_4_API_30
Starting Metro Bundlerenter code here
error listen EADDRINUSE: address already in use :::19000.
Error: listen EADDRINUSE: address already in use :::19000
at Server.setupListenHandle [as _listen2] (net.js:1320:16)
at listenInCluster (net.js:1368:12)
at Server.listen (net.js:1454:7)
at C:\Users\Aman\a\pnd\node_modules\metro\src\index.js:240:20
at new Promise (<anonymous>)
at Object.<anonymous> (C:\Users\Aman\a\pnd\node_modules\metro\src\index.js:239:14)
at Generator.next (<anonymous>)
at asyncGeneratorStep (C:\Users\Aman\a\pnd\node_modules\metro\src\index.js:46:24)
at _next (C:\Users\Aman\a\pnd\node_modules\metro\src\index.js:66:9)
Metro Bundler process exited with code 1
Error: Metro Bundler process exited with code 1
at ChildProcess.<anonymous> (C:\Users\Aman\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\src\start\startLegacyReactNativeServerAsync.ts:271:16)
at Object.onceWrapper (events.js:482:26)
at ChildProcess.emit (events.js:375:28)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Aman\AppData\Roaming\npm-cache\_logs\2021-07-23T09_22_23_399Z-debug.log
[1]: https://i.sstatic.net/xxcZZ.png
Upvotes: 1
Views: 1141
Reputation: 1311
This error says some other process already uses that port 1900.
For Windows users (case in question): See answer by Francesco Clementi.
For Linux users:
Use netstat
(part of net-tools
package) to find out which processes use it:
netstat -tulpn | fgrep 1900
Then use:
ps -aux | fgrep <process name>
to figure out the process ID. Once you have process ID you can stop that process with:
kill -9 <ID>
Warning: this effectively kills the process holding that port, which may result in data corruption or loss, that is managed by that process. Proceed with care.
Upvotes: 2
Reputation: 2102
You have two solution.
first:
kill the process using that port with
netstat -ano | findstr :19000
taskkill /PID /F
the first command will give you a list of processes running on that port, then you need to get the PID and replace it on the second command.
second:
reboot your computer.
Upvotes: 1