Got JS Exception: ReferenceError: Can't find variable: process

react-native react-native-android

3841 просмотра

2 ответа

1115 Репутация автора

After upgrading from react-native 0.26 to 0.29 (and running react-native upgrade), I'm getting the following error in the android debugger:

Got JS Exception: ReferenceError: Can't find variable: process

And this error message in the android emulator

java.lang.RunTimeException: ReferenceError: can't find variable process
 (http://10.0.2.2:8081/index.android.bundle (...)

I haven't changed any of my app javascript since upgrading, and everything ran without errors before so I'm assuming the problem isn't in the javascript, but rather the change of react versions has removed the 'process' variable?

Even loading an empty index file (a single react component that does nothing) still results in the same error.

Автор: Lucas Penney Источник Размещён: 18.07.2016 10:29

Ответы (2)


5 плюса

5602 Репутация автора

Had the same issue:

java.lang.RuntimeException: java.util.concurrent.ExecutionException:
java.lang.RuntimeException: ReferenceError: Can't find variable: process

Fixed by upgrading the React to the latest compatible version, 15.2.1 in my case:

npm i react@15.2.1 --save
Автор: maxnk Размещён: 23.07.2016 12:51

1 плюс

65 Репутация автора

I had this issue, it turns out my problem was that I didn't stop and restart the packager after upgrading react-native.

Автор: Robin Schaaf Размещён: 15.11.2016 04:09
Вопросы из категории :
32x32