Expo开发构建在模拟器上,网络连接丢失。

huangapple go评论58阅读模式
英文:

Expo Development Build on Simulator Network connection lost

问题

我为Expo构建了开发版本,但一旦我这样做了,我就无法从iOS模拟器连接到Expo开发服务器。我尝试过:

  • 降级Expo和React Native
  • 重置路由器
  • 在路由器上打开端口
  • 运行全新的Expo应用程序并安装开发版本

什么都不起作用。安卓和模拟器也一样。还有一台iPhone。

在iOS上,我收到以下错误:从http://......加载应用程序失败。网络连接丢失。
在安卓上,我收到以下错误:http://上意外结束流。

有人有什么想法可以解决这个问题吗?

英文:

I built development builds for an Expo an and as soon as I did that, I was not able to to connect to the expo development server from the iOs simulator. I tried:

  • downgrading expo, react-native
  • resetting router
  • opening ports on the router
  • running a completely new, 'naked' expo app and installing dev builds

Nothing works. Same with android and the emulator. And an iPhone.

On iOs I receive the error: Failed to load app from http://...... The network connection was lost.
On android I receive the error: Unexpected end of stream on http://

Does anyone have an idea what could be done to fix this?

答案1

得分: 8

我遇到了相同的问题,并成功通过将 NodeJS 从版本 20 降级到 NodeJS 18(LTS 版本)来解决它。如果你正在使用 NodeJS 版本 20,你可能想尝试降级。

英文:

I had the same issue and managed to solve it by downgrading from NodeJS 20 to NodeJS 18 (the LTS). If you're on NodeJS version 20, you might wanna try to downgrade.

huangapple
  • 本文由 发表于 2023年5月24日 20:54:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76323773.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定