TypeError: shouldFallbackToLegacyNativeModule is not a function

Current behavior

Error in console:

TypeError: shouldFallbackToLegacyNativeModule is not a function. (In 'shouldFallbackToLegacyNativeModule()', 'shouldFallbackToLegacyNativeModule' is an instance of Object)
- node_modules\react-native\Libraries\LogBox\LogBox.js:148:8 in registerError
- node_modules\react-native\Libraries\LogBox\LogBox.js:59:8 in errorImpl
- node_modules\react-native\Libraries\LogBox\LogBox.js:33:4 in console.error
- node_modules\expo\build\environment\react-native-logs.fx.js:27:4 in error
- node_modules\react-native\Libraries\Core\ExceptionsManager.js:104:6 in reportException
- node_modules\react-native\Libraries\Core\ExceptionsManager.js:171:19 in handleException
- node_modules\react-native\Libraries\Core\setUpErrorHandling.js:24:6 in handleError
- node_modules\expo-error-recovery\build\ErrorRecovery.fx.js:9:32 in ErrorUtils.setGlobalHandler$argument_0
- node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
- node_modules\regenerator-runtime\runtime.js:293:29 in invoke
- node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
- node_modules\regenerator-runtime\runtime.js:154:27 in invoke
- node_modules\regenerator-runtime\runtime.js:164:18 in PromiseImpl.resolve.then$argument_0
- node_modules\react-native\node_modules\promise\setimmediate\core.js:37:13 in tryCallOne
- node_modules\react-native\node_modules\promise\setimmediate\core.js:123:24 in setImmediate$argument_0
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:130:14 in _callTimer
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:181:14 in _callImmediatesPass
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:441:30 in callImmediates
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:387:6 in __callImmediates
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:135:6 in __guard$argument_0
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 in __guard
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:134:4 in flushedQueue
* [native code]:null in flushedQueue
* [native code]:null in invokeCallbackAndReturnFlushedQueue

Expected behavior

Application starting correctly

Repro steps

https://gist.github.com/tuttarealstep/1001d2961bdcb79c883bd5c5775e9318

I only use “await AsyncStorage.getItem” here.

Environment

  • Platforms tested:
    • Android
    • iOS
    • macOS
    • Windows
  • AsyncStorage version: ^1.14.0
  • Expo version: 4.1.6
  • Environment:
    System:
    OS: Windows 10 10.0.19041
    CPU: (4) x64 Intel(R) Core(TM) i5-7400T CPU @ 2.40GHz
    Memory: 1.17 GB / 7.91 GB
    Binaries:
    Node: 14.6.0 – C:\Program Files\nodejs\node.EXE
    Yarn: 1.21.1 – ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.7 – ~\AppData\Roaming\npm\npm.CMD
    Watchman: Not Found
    SDKs:
    Android SDK: Not Found
    Windows SDK: Not Found
    IDEs:
    Android Studio: Version 3.5.0.0 AI-191.8026.42.35.6010548
    Visual Studio: 15.8.28010.2046 (Visual Studio Professional 2017), 16.4.29728.190 (Visual Studio Community 2019), 15.9.28307.423 (Visual Studio Community 2017)
    Languages:
    Java: 1.8.0_201
    Python: 2.7.15
    npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2
    react-native-windows: Not Found
    npmGlobalPackages:
    react-native: Not Found

ECD56095-F6C3-4A24-BA92-F70D0D3D5E6A_1614000575093

1 possible answer(s) on “TypeError: shouldFallbackToLegacyNativeModule is not a function