Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TurboModuleRegistry undefined #753

Open
joeloyj opened this issue Feb 13, 2025 · 0 comments
Open

TurboModuleRegistry undefined #753

joeloyj opened this issue Feb 13, 2025 · 0 comments

Comments

@joeloyj
Copy link

joeloyj commented Feb 13, 2025

The problem

Encountering the following error with TurboModuleRegistry being undefined

λ Bundled 30167ms node_modules/expo-router/node/render.js (3526 modules)
Web node_modules/expo-router/entry.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (3213/3213)

Metro error: Cannot read properties of undefined (reading 'get')

  2 | // and we want to stay compatible with those
  3 | import { TurboModuleRegistry } from 'react-native';
> 4 | export default TurboModuleRegistry.get('PlaidAndroid');
    |                                    ^
  5 |

Call Stack
  factory (node_modules/react-native-plaid-link-sdk/dist/fabric/NativePlaidLinkModuleAndroid.js:4:36)
  loadModuleImplementation (node_modules/metro-runtime/src/polyfills/require.js:277:5)
  guardedLoadModule (node_modules/metro-runtime/src/polyfills/require.js:184:12)
  require (node_modules/metro-runtime/src/polyfills/require.js:92:7)
  factory (node_modules/react-native-plaid-link-sdk/dist/PlaidLink.js:14)
  loadModuleImplementation (node_modules/metro-runtime/src/polyfills/require.js:277:5)
  guardedLoadModule (node_modules/metro-runtime/src/polyfills/require.js:184:12)
  require (node_modules/metro-runtime/src/polyfills/require.js:92:7)
  factory (node_modules/react-native-plaid-link-sdk/dist/index.js:2)
  loadModuleImplementation (node_modules/metro-runtime/src/polyfills/require.js:277:5)
Web Bundled 34271ms node_modules/expo-router/entry.js (3213 modules)
Web Bundled 2015ms node_modules/expo-router/_error.js (334 modules)

Tried the following with the same result:

  • Clearing expo cache
  • Upgrading expo and react-native to latest
  • Deleting node_modules and reinstalling
  • running npm update

Environment

Plaid Link React Native 12.0.3
ReactNative Version 0.74.5
Expo Version 51.0.28
Occurs on Web yes

Steps to Reproduce

Using the create function triggers this error

Expo app run with cache cleared using:

npx expo start --clear

Static rendering occurs when opening the web version in browser, with the above stack trace

With upgraded package versions

Updating expo and react-native to the following latest versions produces the same error with slightly different error message:

Plaid Link React Native 12.0.3
ReactNative Version 0.77.0
Expo Version 52.0.33
Occurs on Web yes
λ Bundled 33191ms node_modules/expo-router/node/render.js (3648 modules)
Web node_modules/expo-router/entry.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (3385/3385)

Metro error: Cannot read properties of undefined (reading 'get')

  TypeError: Cannot read properties of undefined (reading 'get')
    at factory (/Users/joel/src/coral/harbor/react-native-app/node_modules/react-native-plaid-link-sdk/dist/fabric/NativePlaidLinkModuleAndroid.js:4:36)
    at loadModuleImplementation (/Users/joel/src/coral/harbor/react-native-app/node_modules/metro-runtime/src/polyfills/require.js:277:5)
    at guardedLoadModule (/Users/joel/src/coral/harbor/react-native-app/node_modules/metro-runtime/src/polyfills/require.js:184:12)
    at require (/Users/joel/src/coral/harbor/react-native-app/node_modules/metro-runtime/src/polyfills/require.js:92:7)
    at factory (/Users/joel/src/coral/harbor/react-native-app/node_modules/react-native-plaid-link-sdk/dist/PlaidLink.js:14:1)
    at loadModuleImplementation (/Users/joel/src/coral/harbor/react-native-app/node_modules/metro-runtime/src/polyfills/require.js:277:5)
    at guardedLoadModule (/Users/joel/src/coral/harbor/react-native-app/node_modules/metro-runtime/src/polyfills/require.js:184:12)
    at require (/Users/joel/src/coral/harbor/react-native-app/node_modules/metro-runtime/src/polyfills/require.js:92:7)
    at factory (/Users/joel/src/coral/harbor/react-native-app/node_modules/react-native-plaid-link-sdk/dist/index.js:2:1)
    at loadModuleImplementation (/Users/joel/src/coral/harbor/react-native-app/node_modules/metro-runtime/src/polyfills/require.js:277:5)
Web Bundled 37278ms node_modules/expo-router/entry.js (3385 modules)
Web Bundled 197ms node_modules/expo-router/_error.js (171 modules)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant