Network Response Time Out Error (create-react-native-app) (expo)

后端 未结 26 1751
后悔当初
后悔当初 2020-12-02 10:00

I am trying to run create-react-native-app on expo app in android.

Firstly ,I created the project by writing command

create-react-native-app t

26条回答
  •  广开言路
    2020-12-02 10:26

    In my case the firewall settings alone didn't do it. My issue was that VirtualBox network devices were taking priority and the Expo host was starting on the wrong network.

    On windows you can run ipconfig and look at the network adapters you have. npm/yarn start seems to take whatever shows up first in that list.

    I found out about this from here: https://github.com/react-community/create-react-native-app/issues/60

    If you don't need the other network adapters in the list, you can disable them in the Network Connections interface of the Control Panel.

    If you need to use those connections and have Expo work then to solve the issue I followed this process:

    1. Goto Control Panel > Network and Internet > Network Connections
    2. Right click the desired connection (Higher Priority Connection)
    3. Click Properties > Internet Protocol Version 4
    4. Click Properties > Advanced
    5. Uncheck 'Automatic Metric'
    6. Enter 10 in 'Interface Metric'
    7. Click OK

    Repeat for the Lower Priority Connection, but this time put 20 into the 'Interface Metric'

    You'll now use the higher priority connection as a default.

提交回复
热议问题