ReactNative Metro Bundler not starting automatically
Its because the port 8081 is in use..
Try
react-native start --port=8080
This will work out.
Replace the code with this one. The path of the file is -
node_modules\metro-config\src\defaults\blacklist.js
var sharedBlacklist = [
/node_modules[\/\\]react[\/\\]dist[\/\\].*/,
/website\/node_modules\/.*/,
/heapCapture\/bundle\.js/,
/.*\/__tests__\/.*/
];
I found this solution from Github.
Same exact problem I am facing too. I just updated to 0.59.1 and this isn't working... As a work around, I am running the metro builder in a separate tab, and then running react in a separate tab.
react-native start --reset-cache
in one terminal and left it open
react-native run-android
in another terminal
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
, iOSCommand + 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