React Native:运行-ios 已停止工作(ReferenceError)
React Native: run-ios has stopped working (ReferenceError)
我 运行 在 运行 执行 run-ios
命令时遇到了问题。在此之前,该应用程序启动良好,但现在我 运行 在应用程序完成捆绑之前进入此屏幕。
以下是我调试问题的一些步骤:
- 使用
npm start --reset-cache
在启动时重置缓存
- 清除守望者配置
- 启用远程调试以在捕获异常时暂停*
- 为我知道在此问题之前有效的先前提交创建了一个新分支(未解决)
- 删除并重新安装了我的
node_modules
文件夹
- 通过自制程序删除并重新安装守望者
- 已清除 npm 缓存
- 将 react-native 升级为
0.40.0
*这是在 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 版本:0.39.0
- 平台:iOS
- 操作系统:MacOS
当您无法 运行 react-native 应用程序时,我们似乎有类似的清单。
我会尝试的另一件事:
- 在分支中提交您的更改以确保您不会丢失更改
- 删除整个文件夹:rm -rf
- 再次克隆它:git克隆
- Re-install 和 运行: npm install && react-native run-ios ...
这是我最后尝试的方法,但它在过去对我有用。
好吧,我觉得自己像个彻头彻尾的白痴,但这里的解决方案只是重启我的电脑。一定有一个剩余的过程 运行 干扰了捆绑的方式。
我 运行 在 运行 执行 run-ios
命令时遇到了问题。在此之前,该应用程序启动良好,但现在我 运行 在应用程序完成捆绑之前进入此屏幕。
以下是我调试问题的一些步骤:
- 使用
npm start --reset-cache
在启动时重置缓存
- 清除守望者配置
- 启用远程调试以在捕获异常时暂停*
- 为我知道在此问题之前有效的先前提交创建了一个新分支(未解决)
- 删除并重新安装了我的
node_modules
文件夹 - 通过自制程序删除并重新安装守望者
- 已清除 npm 缓存
- 将 react-native 升级为
0.40.0
*这是在 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 版本:0.39.0
- 平台:iOS
- 操作系统:MacOS
当您无法 运行 react-native 应用程序时,我们似乎有类似的清单。
我会尝试的另一件事:
- 在分支中提交您的更改以确保您不会丢失更改
- 删除整个文件夹:rm -rf
- 再次克隆它:git克隆
- Re-install 和 运行: npm install && react-native run-ios ...
这是我最后尝试的方法,但它在过去对我有用。
好吧,我觉得自己像个彻头彻尾的白痴,但这里的解决方案只是重启我的电脑。一定有一个剩余的过程 运行 干扰了捆绑的方式。