Reputation: 21
After loading my react native app I get this error message:
Error: React Refresh runtime should not be included in the production bundle., js engine: hermes
ERROR Error: React Refresh runtime should not be included in the production bundle., js engine: hermes
ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Bridgeless Mode: false. Register ed callable JavaScript modules (n = 9): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, HMRClient.
A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
The same code is running on my friend's laptop, so something is wrong with me, locally.
If I turn off devmode on my phone and there is no fast refresh on the app, everything works fine.
Does anyone know what the problem might be?
Here is my package.json
file:
{
"name": "skinologymobile",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"lint": "eslint .",
"format": "prettier --write .",
"lint:fix": "eslint --fix ."
},
"dependencies": {
"@eslint/js": "9.11.1",
"@expo/config": "9.0.3",
"@expo/config-plugins": "8.0.9",
"@expo/prebuild-config": "7.0.8",
"@react-native-async-storage/async-storage": "2.0.0",
"@react-native-community/datetimepicker": "8.2.0",
"@react-native-ml-kit/text-recognition": "1.5.2",
"@react-navigation/bottom-tabs": "6.6.1",
"@react-navigation/native": "6.1.18",
"@react-navigation/native-stack": "6.11.0",
"@types/react-native-vector-icons": "6.4.18",
"axios": "1.7.7",
"eas-cli": "12.5.1",
"expo": "51.0.34",
"expo-auth-session": "5.5.2",
"expo-camera": "15.0.16",
"expo-cli": "6.3.10",
"expo-constants": "16.0.2",
"expo-crypto": "13.0.2",
"expo-font": "12.0.10",
"expo-image-manipulator": "12.0.5",
"expo-image-picker": "15.0.7",
"expo-random": "14.0.1",
"expo-status-bar": "1.12.1",
"expo-web-browser": "13.0.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.75.3",
"react-native-config": "1.5.3",
"react-native-date-picker": "5.0.7",
"react-native-dotenv": "3.4.11",
"react-native-dropdown-select-list": "2.0.5",
"react-native-multiple-select": "0.5.12",
"react-native-paper": "5.12.5",
"react-native-paper-dropdown": "2.3.1",
"react-native-picker-select": "9.3.1",
"react-native-reanimated": "3.15.3",
"react-native-safe-area-context": "4.11.0",
"react-native-screens": "3.34.0",
"react-native-snackbar": "2.8.0",
"react-native-svg": "15.7.1",
"react-native-vector-icons": "10.2.0",
"react-native-web": "0.19.12",
"typescript-eslint": "8.8.0"
},
"devDependencies": {
"@babel/core": "7.25.2",
"@types/react": "18.3.10",
"@types/react-native-dotenv": "0.2.2",
"@types/react-native-vector-icons": "6.4.18",
"eslint": "9.11.1",
"eslint-config-universe": "13.0.0",
"globals": "15.9.0",
"prettier": "3.3.3",
"typescript": "5.6.2",
"typescript-eslint-parser": "22.0.0"
},
"private": true,
"plugins": [
"@typescript-eslint"
]
}
And my index.js
:
import { registerRootComponent } from 'expo';
import App from './App';
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);
Thank you in advance for your answers!
The same code is running on my friend's laptop, so something is wrong with me, locally. If I turn off devmode on my phone and there is no fast refresh on the app, everything works fine. Does anyone know what the problem might be?
Upvotes: 1
Views: 66