尝试将React Native项目构建到设备时出现奇怪的错误和红屏

时间:2015-11-02 03:02:53

标签: ios xcode reactjs react-native

我正在尝试将我的反应原生项目构建到我的iphone上,但不断收到以下错误:

2015-11-01 20:50:19.134 [error][tid:com.facebook.React.JavaScript] 'Error: Can\'t find variable: Symbol\n stack: \n  <unknown>  main.jsbundle:64380\n  require    main.jsbundle:254\n  <unknown>  main.jsbundle:64198\n  require    main.jsbundle:254\n  <unknown>  main.jsbundle:64125\n  require    main.jsbundle:254\n  <unknown>  main.jsbundle:64028\n  require    main.jsbundle:254\n  <unknown>  main.jsbundle:1409\n  require    main.jsbundle:254\n  <unknown>  main.jsbundle:1398\n  require    main.jsbundle:254\n  require    main.jsbundle:200\n  <unknown>  main.jsbundle:95010\n URL: file:///private/var/mobile/Containers/Bundle/Application/8E332C19-45CF-4874-AC61-7427C508ED16/Jobletics.app/main.jsbundle\n line: 64380\n message: Can\'t find variable: Symbol'
2015-11-01 20:50:19.238 [info][tid:com.facebook.React.JavaScript] 'Running application "Jobletics" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === false, development-level warning are OFF, performance optimizations are ON'
2015-11-01 20:50:19.241 [error][tid:com.facebook.React.JavaScript] 'Error: Invariant Violation: Application Jobletics has not been registered. This is either due to a require() error during initialization or failure to call AppRegistry.registerComponent.\n stack: \n  runApplication  main.jsbundle:44346\n  __callFunction  main.jsbundle:5536\n  <unknown>       main.jsbundle:5472\n  guard           main.jsbundle:5425\n  <unknown>       main.jsbundle:5472\n  <unknown>       main.jsbundle:5469\n  perform         main.jsbundle:7017\n  batchedUpdates  main.jsbundle:16438\n  batchedUpdates  main.jsbundle:6320\n  <unknown>       main.jsbundle:5468\n  guard           main.jsbundle:5425\n  processBatch    main.jsbundle:5467\n URL: file:///private/var/mobile/Containers/Bundle/Application/8E332C19-45CF-4874-AC61-7427C508ED16/Jobletics.app/main.jsbundle\n line: 2012\n message: Invariant Violation: Application Jobletics has not been registered. This is either due to a require() error during initialization or failure to call AppRegistry.registerComponent.

使用此屏幕enter image description here

我已经完成了$ react-native bundle。它可能与权限有关吗?请帮忙。

1 个答案:

答案 0 :(得分:2)

我知道React Native团队正在研究这个问题,但如果你在寻找临时解决方案的同时我建议使用这个polypill。

https://github.com/medikoo/es6-symbol