小编M B*_*aig的帖子

FetchError:对 https://api.expo.dev/v2/sdks/49.0.0/native-modules 的请求失败,原因:在运行 React Native 时读取 ECONNRESET 错误

我有一个 React Native 应用程序文件,之前在 VS Code 中运行良好,但现在每当我尝试运行它时都会出现此错误。我尝试运行它 PS C:\User\Desktop\ReactNativeApp> npx expo start

Starting Metro Bundler

`FetchError: request to https://api.expo.dev/v2/sdks/49.0.0/native-modules failed, reason: 
 read ECONNRESET
 FetchError: request to https://api.expo.dev/v2/sdks/49.0.0/native-modules failed, reason: 
 read ECONNRESET
  at ClientRequest.<anonymous> (C:\User\Desktop\ReactNativeApp\node_modules\node- 
  fetch\lib\index.js:1501:11)

at ClientRequest.emit (node:events:513:28)
at TLSSocket.socketErrorListener (node:_http_client:502:9)
at TLSSocket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)`
Run Code Online (Sandbox Code Playgroud)

我尝试重新启动,甚至创建一个新项目,但它给出了相同的错误。我该如何解决这个错误?

react-native visual-studio-code

4
推荐指数
1
解决办法
3762
查看次数

标签 统计

react-native ×1

visual-studio-code ×1