【问题标题】:Make Sure You're running a packager server or have included a .jsbundle file in your application bundle. (error showing running already build project)确保您正在运行一个打包服务器或在您的应用程序包中包含一个 .jsbundle 文件。 (错误显示正在运行已经构建的项目)
【发布时间】:2021-10-29 23:56:05
【问题描述】:

我正在终端中使用 npx react-native run-ios 运行 React Native 项目,但它显示以下错误:

Make sure you're running a packager server or have
included a .jsbundle file in your application bundle.

RCTFatal 
28—[RCTCxxBridge handleError:]_block_invok e 
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF 
_CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_Q UEUE 
_CFRunLoopRun 
CFRunLoopRunSpecific 
GSEventRunModal 
—[UlApplication _run]
UIApplicationMain 
main 
start

我已经尝试过的解决方案

  • 更改端口
  • 降级节点模块
  • 同时降级 React Native 和项目
  • 将 Firebase 升级到最新版本并重新安装
  • 如果有任何脚本正在运行,则终止端口

我几乎在网上尝试了所有方法,正在寻找解决方案。

【问题讨论】:

  • 所以none of these answers 有帮助吗?
  • 你没有错过错误的标题,比如“没有捆绑 URL 存在” - 那么你可能有一个欺骗 here
  • @mplungjan 我试过了,但没有解决我的问题
  • 打开开发工具(ctrl + m 用于 ios 模拟器或如果不是模拟器则摇动设备),然后在设置中您可以编辑 ip 地址,添加您的计算机本地 ip 和端口,

标签: javascript ios reactjs react-native react-redux


【解决方案1】:

添加这个:

"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'"

对我的 package.json “脚本”起作用。

【讨论】:

    猜你喜欢
    • 2017-12-01
    • 1970-01-01
    • 2020-11-13
    • 2019-09-30
    • 1970-01-01
    • 1970-01-01
    • 2019-09-26
    • 2011-06-24
    相关资源
    最近更新 更多