Metro bundler not starting automatically with expo start

Viewed 10320

I'm using expo to develop a react native app on Windows 10.

When I run expo start the Metro Builder starts automatically only if disconnected from the internet and with the --offline switch. When connected the --offline switch is useless.

This is the console output, there are no errors or warnings (the same is true for expo start --offline):

expo start
Starting project at C:\Users\xxx\Projects\my-reactnative-project
Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)

The output in the browser is: Metro browser output

There are no QR code, no link, pressing Tunnel, LAN or Local makes no difference.

I tried reinstalling expo-cli but the problem is still there. This is the output of expo diagnostics:

  Expo CLI 3.13.5 environment info:
    System:
      OS: Windows 10 10.0.18363
    Binaries:
      Node: 12.11.1 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 6.11.3 - C:\Program Files\nodejs\npm.CMD
    IDEs:
      Android Studio: Version  3.3.0.0 AI-182.5107.16.33.5199772
    npmPackages:
      expo: ~36.0.0 => 36.0.2
      react: ~16.9.0 => 16.9.0
      react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4

Do you know how can I fix this? Thanks in advance.

3 Answers

deleting the metro modules from node_modules , and running npm install worked for me .

Reinstall expo cli, run npm cache clean -- force and run expo start -c or expo start

If it does not work, keep trying, worked for me.

Things that might fix it that worked for me:

  • npm audit fix
  • If on expo start some packages are incompatible
  • install those packages with "expo install ..."
  • Try in another network as it might be just a network issue
  • Use the expo tunnel instead of lan
Related