React Native:运行-ios 已停止工作(ReferenceError)

React Native: run-ios has stopped working (ReferenceError)

我 运行 在 运行 执行 run-ios 命令时遇到了问题。在此之前,该应用程序启动良好,但现在我 运行 在应用程序完成捆绑之前进入此屏幕。

这是我得到的屏幕 link:https://d17oy1vhnax1f7.cloudfront.net/items/1J3n3u1z3w2k2E160V1B/Screen%20Shot%202017-01-18%20at%2010.36.08%20AM.png?v=783d1021

以下是我调试问题的一些步骤:

*这是在 chrome 中检查时出现错误的行:

global = DedicatedWorkerGlobalScope {console: Object, __fbBatchedBridgeConfig: Object, __DEV_

我尝试了很多问题的解决方案,但一直未能找到正确的解决方案。

这里有一些可能相关的信息:

run-ios 启动日志:

Found Xcode project TipHiveMobile.xcodeproj
Launching iPhone 6 (iOS 10.2)...
Building using "xcodebuild -project TipHiveMobile.xcodeproj -   configuration Debug -scheme TipHiveMobile -destination id=DDBF9D1C-CB3F-   4FCF-B9B6-C7AF372B7F3E -derivedDataPath build"
User defaults from command line:

IDEDerivedDataPathOverride = /Users/tylerreckart/Code/tiphive/TipHiveMobile/ios/build


=== BUILD TARGET RNVectorIcons OF PROJECT RNVectorIcons WITH CONFIGURATION Debug ===

log-ios 重新加载时输出

Jan 18 10:45:05 Nosferatu logd[30752] <Notice>: metadata shared cached  uuid is null (using logd's shared cache info) nsurlstoraged (39014)

Jan 18 10:45:05 Nosferatu logd[30752] <Notice>: Failed to harvest strings for pathless uuid '00000000-0000-0000-0000-000000000000'

Jan 18 10:45:15 Nosferatu TipHiveMobile[31100] <Notice>: Initializing <RCTBatchedBridge: 0x608000199300> (parent: <RCTBridge: 0x6000000a28e0>, executor: RCTWebSocketExecutor)

Jan 18 10:45:15 Nosferatu TipHiveMobile[31100] <Warning>: Required dispatch_sync to load constants for RCTSourceCode. This may lead to deadlocks

Jan 18 10:50:33 Nosferatu routined[30747] <Error>: CoreLocation: Error occurred while trying to retrieve motion state update: CMErrorDomain Code:104

当您无法 运行 react-native 应用程序时,我们似乎有类似的清单。

我会尝试的另一件事:

  • 在分支中提交您的更改以确保您不会丢失更改
  • 删除整个文件夹:rm -rf
  • 再次克隆它:git克隆
  • Re-install 和 运行: npm install && react-native run-ios ...

这是我最后尝试的方法,但它在过去对我有用。

好吧,我觉得自己像个彻头彻尾的白痴,但这里的解决方案只是重启我的电脑。一定有一个剩余的过程 运行 干扰了捆绑的方式。

供您娱乐:https://media.giphy.com/media/F7yLXA5fJ5sLC/giphy.gif