2016-12-01 65 views
0

this is the error我已經從git安裝了新的應用程序,但我有這個紅色屏幕錯誤可以幫助我一些人。react-native紅色屏幕錯誤

ReferenceError: Can't find variable: process (http://10.0.3.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:2506) 
E/unknown:React(2312): 
E/unknown:React(2312): Try the following to fix the issue: E/unknown:React(2312): • Ensure that the packager server is running E/unknown:React(2312): • Ensure that your device/emulator is connected to your machine and has USB debugging enabled - run 'adb devices' to see a list of connected devices 
E/unknown:React(2312): • Ensure Airplane Mode is disabled E/unknown:React(2312): • If you're on a physical device connected to the same machine, run 'adb reverse tcp:8081 tcp:8081' to forward requests from your device 
E/unknown:React(2312): • If your device is on the same Wi-Fi network, set 'Debug server host & port for device' in 'Dev settings' to your machine's IP address and the port of the local dev server - e.g. 10.0.1.1:8081 

此輸出是adb logcat。

我創建了GitHub的問題,任何一個可以參考isssue

回答

0

我升級時,我的問題是反應原生本地基模塊不匹配。 checkout this issue,也做npm clean cache

我也刪除了node_module並重新安裝。我去了native-base": "0.5.15" react-native : "0.33.1" and react is "15.3.1",一切都開始正常工作。

檢查這也facebook troubleshoot

1

你運行adb reverse tcp:8081 tcp:8081作爲錯誤信息提示?連接物理設備後,您總是需要執行此操作,並且您可能需要爲Genymotion執行相同的操作(從未與React一起使用過)。

另外請確保您沒有其他進程在端口8081上運行:sudo lsof -n -i4TCP:8081 | grep LISTEN。 如果這樣做,則可以通過執行kill -9 <PID>來終止該進程,或者在另一個端口上啓動打包程序:react-native start --port 8082

如果這無助於嘗試在基本Android模擬器上而不是Genymotion上打開應用程序,以查看是否得到相同的錯誤。

+0

您好我已經嘗試過那些步驟還與基本模擬器。它有同樣的問題 – santhosh