Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

[runtime not ready]: ReferenceError: Property 'require' doesn't exist, js engine: hermes

I’m working on a React Native project using Expo SDK 53 and React Native 0.79.2. When running the app, I get this runtime error:

[runtime not ready]: ReferenceError: Property 'require' doesn't exist, js engine: hermes

Project Setup:

    •   Expo SDK: 53.0.8
    •   React Native: 0.79.2
    •   Hermes Engine: Enabled
    •   Lottie: lottie-react-native 5.1.4 and lottie-ios 4.5.0
    •   react-native-screens: 4.10.0
    •   I was using require() for images (e.g., require('../assets/images/home-bg.png')) and switched to import syntax.
    •   I’ve tried setting "jsEngine": "jsc" but the issue persists.
    •   I’m building using EAS and running on a real iOS device.

What I’ve Tried:
    •   Replaced all require() image references with import
    •   Disabled Hermes (temporarily)
    •   Fixed Lottie iOS version conflicts
    •   Cleaned node_modules, .expo, ios/Pods, and Podfile.lock
    •   Rebuilt project with expo prebuild --clean && eas build -p ios

enter image description here

like image 834
Efe Çağatay ERCAN Avatar asked Jul 21 '26 21:07

Efe Çağatay ERCAN


2 Answers

Add into metro.config.js:

config.resolver.unstable_enablePackageExports = false;

like image 78
TheHakan Avatar answered Jul 24 '26 12:07

TheHakan


I had the same problem with Expo 53.0.23 and RN 0.79.6 in Android release builds. In my following change in .babelrc resolved it. In hope it will help someone else:

{
-  "presets": ["module:@react-native/babel-preset"],
+  "presets": ["module:babel-preset-expo"],
}

Source: https://www.reddit.com/r/reactnative/comments/1kee4o4/runtime_not_ready_referenceerror_property_require/

like image 28
Rafa2602 Avatar answered Jul 24 '26 11:07

Rafa2602