【发布时间】:2021-03-21 14:09:21
【问题描述】:
我是 React Native Expo 的新手,我需要在我的项目中添加一些新模块。 “expo”:“33.0.0”,“react”:“16.8.3”,每当我尝试运行我的项目时,都会出现错误,无法运行项目。我尝试了各种方式运行项目,例如set REACT_NATIVE_PACKAGER_HOSTNAME='192.168.0.102'、防火墙关闭、允许入站 19000 端口等,但出现错误。
当我输入expo start -c
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo install [package-name ...]
Starting Metro Bundler on port 19001.
Your JavaScript transform cache is empty, rebuilding (this may take a minute).
Your native app is running at exp9c305c55e38f4d0e856f59397620314e://192.168.0.101:19000
Logs for your project will appear below. Press Ctrl+C to exit.
然后我的笔记本电脑和手机连接到相同的网络和相同的 IP 但出现错误,我不知道端口 19000 与我的 wifi 不同
Uncaught Error:java.net.SocketTimeoutException:failed to connect to/192.168.1.20(port 19000)from/192.168.0.102(port 49615) after 10000ms
请给出一些解决方案。
【问题讨论】:
标签: reactjs react-native react-redux expo