Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Expo building very slowly

I've recently noticed my build time has increased considerably, sometimes taking a full minute to load. On the console I still see "Building JavaScript bundle: finished" fairly quickly but the screen takes much longer to refresh. Is there a reason something like this would be happening?

like image 507
Billy Bob Joel Avatar asked Jul 14 '17 00:07

Billy Bob Joel


2 Answers

Try using Expo in a Simulator on your development machine and determine if it is taking as long as on your device:

  • If it is faster than on your test device, then you should check the network connection on your test device
  • If it is as slow as on the test device, then you could try to remove node_modules and reinstall them with 'npm install' or 'yarn'. Expo will be redownloaded aswell as all other packages.
like image 165
Marco Avatar answered Oct 17 '22 15:10

Marco


In my case, it was a different solution.

I followed the instructions given by jimmylee on the Expo SDK forums, which say:

If you are behind a VPN, try disabling the VPN.

If you are using windows 10, run CMD on your machine and type ipconfig. Take a look at the first Ethernet Adapter. If it doesn’t say Ethernet Adapter Ethernet it means Expo is taking the IP address of something else.

To fix this, go to network connections and disable the adapter that it should not be pointing at.

Connect your computer to the network and your phone to the same network. Restart Expo.

So, go to Settings > Network & Internet.

Click Change Adapter Options:

Click Change Adapter Options

Then disable the unneeded Ethernet:

Then Disable the unneeded ethernet

Then restart Expo.

like image 35
Ahmad Khoja Avatar answered Oct 17 '22 13:10

Ahmad Khoja