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

后端 未结 26 1649
后悔当初
后悔当初 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:41

    If you are using git bash for development then this solution by Icruz4 will help

    Instead of

    set REACT_NATIVE_PACKAGER_HOSTNAME

    Use:

    export REACT_NATIVE_PACKAGER_HOSTNAME='192.168.1.123'
    

    Note:

    When you run

    npm start

    Expo tells you in the output the IP it's using. If that IP is not the IP you want then the

    REACT_NATIVE_PACKAGER_HOSTNAME

    environment variable is not set properly

提交回复
热议问题