Reactnative Metro Bundler Not Starting Automatically

ReactNative Metro Bundler not starting automatically

I tried following steps it resolves my issue

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

ReactNative: metro bundler is not working

The problem was not with Podfile,info.plist or a some command. When using expo eject, I chose the option to useexpoKit. The main reason was that there was no expoKit in the project module.

First, install the library as shown below:

$ yarn add expokit react-native-unimodules

Then, after running the bundler server with expo start, the code was built with xcode, so both the mobile device and the simulator ran properly.

React-Native Run-Android Doesn't recognize Open Metro Server

Solution:
Run the start metro server and run-android commands on a different port.
I suspect McAfee was using the default port 8081.

Open admin CMD/Powershell and run the following:

Reverse the port that the adb device will listen on:
adb reverse tcp:8081 tcp:8090

Start the Metro server on the same port:
npx react-native start --port 8090

Open another admin CMD/Powershell window and run:

Start the android build/run on the same port:
npx react-native run-android --port=8090

The last command should also start the emulator automatically.

If the metro server errors out after you do the run-android command, just run the npx react-native start --port 8090 again in the same window.

'expo start' or 'npm start' command stuck at ''Starting metro bundler

This happened to me because I reset my network settings on my phone earlier today which wiped out my all Wi-Fi connections. So my root cause was simple- my phone just wasn't on the same network as my PC anymore.

If you know you're on the right network, there are more details and potential solutions here: https://github.com/expo/expo-cli/issues/2934 and I think it's important to note that bundling won't start until you click the link from the QR code.

Most likely, it is a network access issue.



Related Topics



Leave a reply



Submit