1

I'm working with windows 10, connected to my home Wifi. I have installed VMWare & Virtualbox as well.

When I try to run react native app, with npm start, it picks the wrong ip which is infarct virtualbox ip. It's not picking the ip of my wireless network. How can I make it use the correct IP, so I can access it from my phone ( which is on the same network as well)

Riz
  • 6,746
  • 16
  • 67
  • 89

1 Answers1

3

Finally found the solution. The following steps helped me.

  1. First I connected my laptop with wifi.
  2. Click Run in Start Menu and type ncpa.cpl to open Network Connections. Or open Control Panel and search for 'network connections'
  3. Right-Click on 'Wifi' > select 'Properties' > 'Internet Protocol Version 4 (TCP/IPv4)' [don't uncheck the mark]
  4. Go to "Properties" > "Advanced..." > (Uncheck 'Automatic Metric') > Type in the text-box below that (Interface Metric) : 10.
  5. Click OK and OK and OK :)
  6. Then do the same for the other "Virtual Box-xxxxx" networks. But instead put 20 in the Interface Metric text-box.
  7. Click OK, OK and OK.
  8. Try restarting your app on Expo. It must work now!

Source

Riz
  • 6,746
  • 16
  • 67
  • 89