Hey everyone, running into a startup crash on Android (Expo Go on physical device) and haven't been able to pinpoint why NativeComponentRegistry is coming back undefined at module load time.
Error
Plaintext
Uncaught Error: [runtime not ready]: TypeError: Cannot read property 'get' of undefined, stack:
anonymous@195014:73
loadModuleImplementation@321:15
guardedLoadModule@217:37
metroRequire@120:91
anonymous@194899:33
loadModuleImplementation@321:15
...
What inspecting the bundle showed
Looking around line 195014 in node_modules/expo-router/entry.bundle (platform=android&dev=true&minify=false), it lands right inside react-native-screens (FullWindowOverlayNativeComponent.ts):
JavaScript
var NativeComponentRegistry = require(_dependencyMap[1], "react-native/Libraries/NativeComponent/NativeComponentRegistry");
var nativeComponentName = 'RNSFullWindowOverlay';
var __INTERNAL_VIEW_CONFIG = {
uiViewClassName: "RNSFullWindowOverlay",
validAttributes: {
accessibilityContainerViewIsModal: true
}
};
var _default = NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
And right after it in the bundle are react-native-screens/src/useTransitionProgress.tsx and react-native-screens/src/components/tabs/index.ts.
Key Libraries & Setup (package.json)
- Core / Expo:
expo (~58.1.0), expo-router (~58.0.33), react (19.3.0), react-dom (19.3.0), react-native (0.88.1), typescript (~6.0.3) - Styling / UI:
nativewind (5.0.0-preview.4), react-native-css (3.0.4), u/gluestack-ui/core (5), u/gluestack-ui/utils (5), tailwindcss (4), u/tailwindcss/postcss (^4.3.5) - Navigation / Gestures / Animations:
react-native-screens (~4.30.1), u/react-navigation/native (^7.5.2), react-native-gesture-handler (~3.3.0), react-native-safe-area-context (~5.11.1), react-native-reanimated (4.7.1), react-native-worklets (0.13.0) - Other Expo & Native Libs: u/expo
/vector-icons (^15.0.2), expo-constants (~58.0.16), expo-font (~58.0.12), expo-image (~58.0.19), expo-linking (~58.0.17), expo-secure-store (~58.0.3), expo-status-bar (~58.0.5), expo-system-ui (~58.0.7), react-native-svg (15.16.0), react-native-webview (14.0.1) - Postinstall patch & overrides: Runs a
postinstall script (scripts/patch-react-native-css-reactivity.mjs) to defer Dimensions / Appearance access in react-native-css reactivity, and pins lightningcss (1.30.1) and magic-string (0.30.17) under overrides / resolutions.
JSON
{
"name": "mobile",
"version": "1.0.0",
"main": "expo-router/entry",
"dependencies": {
"@expo/vector-icons": "^15.0.2",
"@gluestack-ui/core": "5",
"@gluestack-ui/utils": "5",
"@react-navigation/native": "^7.5.2",
"expo": "~58.1.0",
"expo-constants": "~58.0.16",
"expo-font": "~58.0.12",
"expo-image": "~58.0.19",
"expo-linking": "~58.0.17",
"expo-router": "~58.0.33",
"expo-secure-store": "~58.0.3",
"expo-status-bar": "~58.0.5",
"expo-system-ui": "~58.0.7",
"nativewind": "5.0.0-preview.4",
"react": "19.3.0",
"react-dom": "19.3.0",
"react-native": "0.88.1",
"react-native-css": "3.0.4",
"react-native-gesture-handler": "~3.3.0",
"react-native-reanimated": "4.7.1",
"react-native-safe-area-context": "~5.11.1",
"react-native-screens": "~4.30.1",
"react-native-svg": "15.16.0",
"react-native-web": "^0.21.4",
"react-native-webview": "14.0.1",
"react-native-worklets": "0.13.0"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.3.5",
"@types/react": "~19.3.0",
"tailwindcss": "4",
"typescript": "~6.0.3"
},
"scripts": {
"postinstall": "node scripts/patch-react-native-css-reactivity.mjs",
"start": "expo start",
"typecheck": "tsc --noEmit",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"private": true,
"overrides": {
"lightningcss": "1.30.1",
"magic-string": "0.30.17"
},
"resolutions": {
"lightningcss": "1.30.1",
"magic-string": "0.30.17"
}
}
What I've tried so far
npx expo-doctor passes 20/20 checks.- Reinstalled/aligned
react-native-screens (~4.30.1) and expo-router (~58.0.33) and started Metro with --clear. - Added
postinstall patch for react-native-css reactivity (Dimensions / Appearance).
Has anyone hit NativeComponentRegistry.get(...) being undefined during module evaluation with expo-router + react-native-screens + nativewind@5.0.0-preview.4 / react-native-css@3.0.4 on RN 0.88.1 / React 19.3.0? Any ideas on what's causing the import/evaluation order issue or Fabric registry mismatch?