__fbBatchedBridgeConfig is not set, cannot invoke native modules

Hi everyone,

I have the same issue as @chirov3. It is a simple repro:

  1. run npx create-react-native-app test-expo-web
  2. choose the expo-template-blank template (also tried the tabs template and got the same result)
  3. run expo run --web
  4. see error on browser

I’m running npm on 6.13.6 and expo-cli on 3.17.24.

P.S.: The expo-cli console prints the following warnings, but they seem unrelated to the actual __fbBatchedBridgeConfig error:

Compiled with warnings.
./node_modules/expo/build/logs/LogSerialization.js
Attempted import error: 'react-native/Libraries/Core/Devtools/symbolicateStackTrace' does not contain a default export (imported as 'symbolicateStackTrace').

./node_modules/react-native/Libraries/Performance/Systrace.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

To give a bit of context on how I ran into this error, I have a mature expo managed project (started on SDK 31) that is currently running SDK 36 perfectly on both android and ios. Product lifecycle now claims for a web version and while following the setup to integrate the web platform to our expo.platforms array on app.json was seamless (thanks to the great docs! :heart:), I got this when I tried to compile with expo start --web:

Failed to compile.
./node_modules/react-native/Libraries/Components/TextInput/TextInputState.js
Module not found: Cannot resolve '../../Utilities/Platform' in './node_modules/react-native/Libraries/Components/TextInput'

Looking into node_modules/react_native folder, I saw that indeed the node_modules/react-native/Libraries/Utilities/Platform.js doesn’t exist, but it has Platform.android.js and Platform.ios.js.

So that’s when I tried to spin up a brand new CRNA managed project hoping to see what those node_modules/react-native files looked like on a web build that could successfully compile so I maybe could figure out which react-native/platform file to use (fixed with patch-package or something else), but ended up having this other __fbBatchedBridgeConfig issue… :slightly_frowning_face:

All help and/or insight into any of these issues would be greatly appreciated. Thanks in advance!