I got this error today, then I uninstall react-native-cli and reinstall it, the problem's still there. I even run the reset-cache command! I tried to create a new react-native app and still see the error. I don't want to reinstall my os for this...
I've faced this issue too this happened because babel now adds 'use strict' automatically so it checks function declarations in a lexically nested statement
this happens in core react-native code (node_modules\react-native\ReactAndroid\src\androidTest\assets\AndroidTestBundle.js) you can find more info in github issue https://github.com/facebook/react-native/issues/11389
as a workaround you can enable remote debugging - it works for me
I've found simple solution
open node_modules\react-native\Libraries\Core\InitializeCore.js line 112
change function handleError(e, isFatal) to var handleError = function(e, isFatal)
then do npm start -- --reset-cache
you can also check it in github issue above
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With