expo: TypeError: shouldFallbackToLegacyNativeModule is not a function. after setting up redux-persist

Summary

i’m getting this error when i set up redux-persist. TypeError: shouldFallbackToLegacyNativeModule is not a function. (In ‘shouldFallbackToLegacyNativeModule()’, ‘shouldFallbackToLegacyNativeModule’ is an instance of Object)

as far as i understood it has something to do with app registery, i tried to use both AppRegistery of react-native and expo’s version registerRootComponent, but none of them worked.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

40

Environment

Expo CLI 4.1.6 environment info: System: OS: Windows 10 10.0.19042 Binaries: Node: 15.9.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.4 - C:\Users\User\AppData\Roaming\npm\yarn.CMD npm: 7.5.4 - C:\Program Files\nodejs\npm.CMD npmPackages: expo: ~40.0.0 => 40.0.1 react: 16.13.1 => 16.13.1 react-dom: 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-web: ^0.15.0 => 0.15.0 Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

unavailable

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 15 (4 by maintainers)

Most upvoted comments

i’ve updated the expo docs accordingly:

Screen Shot 2021-02-22 at 11 21 38 AM

the issue with 1.14.0 is my fault - sorry about that, we will have it resolved soon

Please use version 1.13.4 as I’ll get this resolved of @react-native-async-storage/async-storage

the problem is with my patch to async storage that was released in 1.14.0. the maintainers have since fixed that and re-released as 1.14.1, so this should not be a problem for anyone going forward

what a super helpful thread at the right time. I hit this issue an hour ago and now this has fixed it. yarn add @react-native-async-storage/async-storage@1.13.4