Prateek Priyadarshi
Prateek Priyadarshi

Reputation: 63

I am getting this error : error listen EADDRINUSE: address already in use :::19000. What to do?

Developer tools running on http://localhost:19002 Opening developer tools in the browser... Starting Metro Bundler error listen EADDRINUSE: address already in use :::19000.

Error: listen EADDRINUSE: address already in use :::19000

Upvotes: 4

Views: 5721

Answers (3)

Dante Nuñez
Dante Nuñez

Reputation: 523

This is happening with the version 4.8.1 of expo-cli https://github.com/expo/expo-cli/issues/3687

The best way to solve this is to downgrade your version of expo to 4.7.3.

npm i -g [email protected]
yarn global add [email protected]

If you have to work on [email protected] I fix this changing the default port of expo. You can create an .exprc file in your project root with

{
  "manifestPort": valid port number (e.g. 19002)
}

Don't forget to add the .exprc to your .gitignore file c;

Upvotes: 8

VVS
VVS

Reputation: 293

Error Message

Looks like this happens also when you have a newer version of EXPO CLI and a older version of EXPO installed on project.

So in my situation I had v38 EXPO on my project which I upgraded to v39 (due to SDK being out of date on EXPO GO). I also thought it would be a good idea to update EXPO CLI globally to 4.8.1. When running it, I ended up with the error in the image. So luckily I recalled the previous version which was installed, in my case was EXPO CLI 3.27.14 (So I removed the latest version of EXPO CLI globally and installed the older version) which solved my issue.

Remove Older version command: yarn global remove expo-cli

Install specific version command: yarn global add [email protected]

Metro bundler running successfully

Upvotes: 4

user13423237
user13423237

Reputation:

This means that your running same command on other terminal... try quiting all the terminal and even your vscode or sublime and then close the simulator aswell... then run it again, if it doesnt work try this:

I tried following steps it resolves my issue

Running packager on different port react-native start --port 8084 --reset-cache Run react-native run-android --port 8084 in second Command Prompt window. After error screen appear clicking Android Ctrl + M, iOS Command + D. Click Dev Settings button at the bottom. Click Debug server host & port for device button. Type localhost:8084 and click OK button. Again run react-native run-android --port 8084

You can try to run it on different port so that you can run the 19000 port on other things and run 8094 on your react native app :)

If it still doesnt work try restarting your pc and run the command.

Cheers, I hope i help!

Credits from here: ReactNative Metro Bundler not starting automatically

Upvotes: 3

Related Questions