react-native: Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). When Upgrading To React Native v0.70
Description
Upgrade from 0.68.1 to 0.70.0. Builds fine in Xcode. Launches Simulator. Splash screen for app appears.
and then it crashes with the error:
ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. 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
Version
0.70.0
Output of npx react-native info
ystem: OS: macOS 12.3.1 CPU: (4) x64 Intel® Core™ i7-4578U CPU @ 3.00GHz Memory: 1.20 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.15.0 - /usr/local/bin/node Yarn: Not Found npm: 8.5.5 - /usr/local/bin/npm Watchman: 2022.03.21.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: Not Found react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
Upgrade from 0.68.1 to 0.70.0. Builds fine in Xcode. Launches Simulator. Splash screen for app appears.
and then it crashes with the error:
ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. 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
Snack, code example, screenshot, or link to a repository
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 103
- Comments: 254
I succeed to avoid this error. In my case, it was due to the react-native-gesture-handler that changed.
Previously we needed to import it at the top of the root file, now we must do that in App.js instead
Hope it will help
Now after wasting so much time, I have to downgrade to 0.68
i have the same issue
Not worked for me.
i have the same issue too
In my case it was
ViewPropTypes
fromreact-native-camera
, I’ve applied this patch:and the error went away, note that I hade to manually install:
yarn add deprecated-react-native-prop-types
.The error you have above is incomplete, you’re missing this important part:
TypeError: undefined is not an object (evaluating '_reactnative.Text.propTypes.style')
my colleague @lirazhad was able to fix it by applying this patch package on react-native 0.70.0 itself! don’t forget to add this dependency into your package.json. “deprecated-react-native-prop-types”: “^2.3.0”,
still seeing this. did meta lay off the entire react-native QA team?
I was upgrade react-native from 0.67.3 to 0.70.3.
In my case problem was with: ColorPropType, EdgeInsetsPropType, PointPropType, ViewPropTypes.
My steps to resolve this issue:
yarn add patch-package
"postinstall": patch-package"
yarn add deprecated-react-native-prop-type
node_modules/react-native/Libraries/InitializeCore.js
require('../LogBox/LogBox').install(); }
add:require('../ReactNative/AppRegistry')
;npx patch-package react-native
import { EdgeInsetsPropType } from 'react-native'
onimport { EdgeInsetsPropType } from 'deprecated-react-native-prop-types'
;npx patch-package LIBRARY_NAME
I have the same issue
package.json deps
axios 1.1.3 is the problem, downgrade to 0.27.2
Any update on the same ? react-native-bot
FYI: react-native 0.71 reintroduces PropTypes to give the developers more time to upgrade: https://reactnative.dev/blog/2023/01/12/version-071#restoring-proptypes
jayscottthomas wow I don’t know, anyway why i did is not viable, React strongly do not recommend a such patch-package.
It’s also not recommend to use patch-package on the React Native file because this will only mask the issue. https://github.com/facebook/react-native/issues/33734#issuecomment-1242387033
What I smell is that there is no choice, each of use MUST identify which 3rd party uses the forbidden type, and try to update it, or to fix it by opening a PR in the 3rd repo itself. [the pb is that search in my node_modules, and no trace of a such deprecated type!] React are clear, they do not intend to fix this ! https://github.com/facebook/react-native/issues/33734#issuecomment-1242387033
@yogeshBright
Adding the following line in the file::
node_modules/react-native/Libraries/Core/InitializeCore.js
It helped me a lot to debug the errorsIn my case there were dependencies that used ViewProps that were deprecated, I solved updating the dependencies
any update on the issues?
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. 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. at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:17 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:39 in handleError at node_modules/expo/build/errors/ExpoErrorManager.js:25:19 in errorHandler at node_modules/expo/build/errors/ExpoErrorManager.js:30:24 in <anonymous> at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
Having same issue although upgraded to sdk 47.0.0 but still issue occurred.
@heroshinn it’s not up to the meta devs, it’s up to the library maintainers to catch up, there were many changes introduced in 0.70 so everyone need to be patient here and not rush to upgrade to 0.70.
The best thing to do in general is to stay 2 major versions behind from the latest one and keep an eye on the repos of the packages you’re using for compatibility updates.
Even major libraries like react-native-screens had a 0.70 compat update just yesterday, long time after 0.70 came out.
ps. rn is still on 0.xx, just saying, breaking changes are expected on every major update.
The near impossibility of debugging this issue when it occurs really must be addressed.
Error messages are okay. This error message is not okay. It’s the second time in 3 months I’m wasting half a day or more because of this message. The only viable troubleshooting strategy is cutting apart your app until it runs and then putting it back together. Am I wrong? And I still have no solution.
@mdvacca @sammy-SC I am begging you to find some way to improve the developer experience here.
Additionally this message sometimes appears in the console, and other times only in the device logs (which means you can’t see them without Flipper.) Every time this occurs the application must be fully restarted to constitute a valid test of whether this is going to occur after some code changes - merely refreshing is not enough. The amount of time and energy this takes… I feel like there must be a better way…
The only soltuion that has worked for me is
npm i deprecated-react-native-prop-types
inside node_modules/react-native/index.js
replace these functions with the below lines
// Deprecated Prop Types get ColorPropType(): $FlowFixMe { console.warn(‘’); return require(‘deprecated-react-native-prop-types’).ColorPropType; }, get EdgeInsetsPropType(): $FlowFixMe { console.warn(‘’); return require(‘deprecated-react-native-prop-types’).EdgeInsetsPropType; }, get PointPropType(): $FlowFixMe { console.warn(‘’); return require(‘deprecated-react-native-prop-types’).PointPropType; }, get ViewPropTypes(): $FlowFixMe { console.warn(‘’); return require(‘deprecated-react-native-prop-types’).ViewPropTypes; },
Same issue here
ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. 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. ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. 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.
In our case we are upgrading from 0.65.1to 0.70.1after xcode update. Stripe seemed to break the xcode build.
What has worked well in the past when the builds break, is that we start with a 0.70.1 hello world application and then slowly integrate our existing app in by bringing in the various modules and wrapping the h/w app inside them etc etc
What we noticed in this occasion that when we updated index.js to the current app code then we got this error. By process of elimination by commenting out all references till we got the h/w app back again and then bringing back each reference one by one till it broke.
In this case it looks like @aws-amplify/pushnotification package is the current culprit so we are now looking at upgrading that package etc etc to see if we can resolve and then likely move onto the next one.
Become a developer they said… It will be fun they said…
do not use/upgraded to latest version for the while. patching isn’t good
For those wondering what is the quickfix (not recommended) it is:
npx patch-package react-native
You’re welcome 😄
updating to expo sdk 47.0.9 fixed the issue.
I think I just found a solution. Apparently the react-native team prepared a commit here that hasn’t been merged yet: https://github.com/facebook/react-native/commit/b966d297245a4c1e2c744cfe571396cfa7e5ffd3
From this, I created a patch for
0.70.6
which will resolve also the_reactnative.Text.propTypes.style
error.yarn add react-native@0.70.6 deprecated-react-native-prop-types@3.0.1
yarn patch
orpatch-package
with the following contents:Hope this will help you, good luck!
Yup, same here:
same problem here…
ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
Same error with a slight change after upgrading to 0.70.6. It says
Cannot read property 'style' of undefined
"dependencies": { "@expo/vector-icons": "^13.0.0", "@react-native-async-storage/async-storage": "~1.17.3", "@react-native-firebase/analytics": "^16.4.3", "@react-native-firebase/app": "~15.4.0", "@react-native-picker/picker": "2.4.8", "@react-navigation/bottom-tabs": "^6.3.1", "@react-navigation/native": "^6.0.10", "@react-navigation/native-stack": "^6.6.2", "@sentry/react-native": "4.2.2", "@sideway/address": "^4.1.0", "axios": "^0.27.2", "base-64": "^1.0.0", "core-js": "^3.8.3", "dayjs": "^1.11.2", "expo": "^47.0.0", "expo-app-loading": "~2.1.1", "expo-apple-authentication": "~5.0.1", "expo-application": "~5.0.1", "expo-asset": "~8.6.2", "expo-auth-session": "^3.7.2", "expo-build-properties": "~0.4.0", "expo-clipboard": "~4.0.1", "expo-constants": "~14.0.2", "expo-dev-client": "~2.0.0", "expo-device": "~5.0.0", "expo-firebase-core": "~6.0.0", "expo-font": "~11.0.1", "expo-image-picker": "~14.0.1", "expo-linear-gradient": "~12.0.1", "expo-linking": "~3.2.3", "expo-notifications": "~0.17.0", "expo-random": "^13.0.0", "expo-status-bar": "^1.4.2", "expo-web-browser": "~12.0.0", "fbemitter": "^3.0.0", "fbjs": "^3.0.0", "fbjs-scripts": "^3.0.0", "firebase": "^9.9.2", "flow": "^0.2.3", "global": "^4.4.0", "isomorphic-fetch": "^3.0.0", "joi": "^17.3.0", "libphonenumber-js": "^1.10.13", "lodash": "^4.17.15", "mobx": "^6.5.0", "mobx-react": "^7.3.0", "moment": "^2.29.3", "node-fetch": "^2.6.1", "react": "18.1.0", "react-addons-shallow-compare": "^15.6.3", "react-dom": "18.1.0", "react-hook-form": "^7.34.0", "react-native": "0.70.5", "react-native-classnames": "^0.1.1", "react-native-cli": "^2.0.1", "react-native-gifted-chat": "^0.16.3", "react-native-picker-select": "^8.0.4", "react-native-reanimated": "^2.12.0", "react-native-safe-area-context": "4.4.1", "react-native-screens": "~3.18.0", "react-native-snap-carousel": "^3.9.1", "react-native-tab-view": "^2.16.0", "react-native-vector-icons": "^7.1.0", "sentry-expo": "~5.0.0" }, "devDependencies": { "@babel/core": "7.12.9", "@babel/plugin-proposal-class-properties": "^7.17.12", "@babel/preset-flow": "^7.9.0", "@types/react": "~18.0.24", "@types/react-native": "~0.70.6", "babel-preset-expo": "~9.2.1", "create-react-class": "^15.7.0", "flow-bin": "^0.123.0", "jest-expo": "^47.0.0", "prettier": "^2.7.1", "typescript": "^4.6.3" },
After expo sdk 47 update:
ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. 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.
I’m having the same issue here
Hi, I was on 0.27.2, I upgraded to 1.1.3 (sorry for the typo in previous post) , without changing my code, I had the bug, I decreased back to 0.27.2, all was ok back after a yarn start --reset-cache . Do you want more infos, tests , code ?
I´ve just tried to upgrade from 0.68.2 to 0.70.3 without success!
I tried. Same issue !
This worked on my end, in case if you have firebase Downgrade firebase into 14.1.0
"@react-native-firebase/app": "14.1.0"
I hope this helps.
In my case, the problem appeared to be related to RN 0.70.6 and react-native-reanimated 2.14.1 The problem is solved in react-native-reanimated 2.14.2
v2.14.1 needs libhermes-executor-debug.so in release build
after upgrade 0.70.6 my apps still encounter
TypeError: Cannot read property 'style' of undefine
so what you did to fixed that?UPDATE: i can confirm that 0.70.6 not include the patch, so we have to add it by ourselves.
but still this error still occur
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable
If they brought the breaking changes which affected many third-party libraries, they should do something about it.
I updated my project from 0.64 to 0.70.6 because it was complaining about us using the old version of React Native and it took me some time to update it. I don’t want to reverse all that work.
same issue this is anonnyinggg oh jesus help us
hi, same pb : for me it was Axios : good in v0.27.2, and thoses messages when I jumped to 11.3 ! @jasonsaayman
having same issue after upgrading version from 0.67.3 to 0.70.3. any update on this ??
@jyotiprakash111 I tried upgrading now, but did not work too.
thanks now it working after moving to react native 0.68 version
what version should i try ?? i tried everything same issue
Is there any way to make it so this error is more descriptive?
I’m now seeing:
but I don’t know which undefined value to look for
In my project any firebase import cause this problem. Without firebase no errors ><
UPDATED: Im forgot initialize FB in .mm file, so after upgrade firebase and reinit, error gone, but another lib now cause error 😃
Hi, did anyone manage to solve this, I’m still getting this error in iOS. Thank you.
I’m with the same error. Whem I run using
yarn expo start
, then my app get crash with this error, using the expo go app on IPhone device, Android device and ios emulator. But whem I runyarn ios
and select to show on ios emulator, my app run without any problem. I’m on sdk 47.0.9 of expo and 0.70.5 of react native. I’m still building my app, so I can wait a little for an update, but this error starts when I update the versions of both expo and react native dependencies.Change all files, like here https://github.com/facebook/react-native/commit/b966d297245a4c1e2c744cfe571396cfa7e5ffd3
Same here, too. expo45 to 47 updated error
You saved me @27leaves Thank you! 🥹
@keerthika-priya For me it did also resolve this error, yes.
I think if you use
react-native@0.70.6
the patch should work. If it does not, you could also create your own patch (withpatch-package
oryarn patch
) and follow the changes here: https://github.com/facebook/react-native/commit/b966d297245a4c1e2c744cfe571396cfa7e5ffd3@27leaves there is some issue with the patch package and does that fix the 2nd part of the error too?
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. 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
this helps me thanks
I have been able solve this issue on my on part, Most times this error shows up as a result of a third party library making the app crash. The newer version of expo (47) throws this error. Its best to downgrade to 46 (use: expo upgrade 46) and use a react native version compatible with 46 between 0.69 to 0.70(yarn add react-native@said version)
0.68 is the latest working version of RN.
I’ve spent a lot of time trying to upgrade my project and now I understand - use 0.68 or use native solutions for iOS and Android.
React Native 0.68 has the power of community and 0.70+ has not.
Can confirm the error doesn’t appear anymore using axios 1.2.0
In my case it was axios.
Downgrading axios to 0.27.2 fixed it for me. Maybe it helps someone else.
For my issue related
deprecated-react-native-prop-types
. After installdeprecated-react-native-prop-types
, and edit functions in the node_modules/react-native/index.jsThat working well
Confirmed this issue was due to axios 1.1.3, reverted to 0.27.2 and yarn start --reset-cache, now it’s good.
Hi this issue appears to be affecting a lot of people, what is the best way to get support for it? It’s unclear what is causing it, but I am receiving the same error as the previous posters.
I faced the same issue when upgrading
Expo
from 49 to 50 andreact-native
from0.72.3
to0.73.4
with the following error:I resolved the issue by searching for
react-native
in thepackage-lock.json
file and checking if any dependency had a lower version being used, for example, the following package was using the older0.72.4
version than the new version inpackage.json
file:I added an
overrides
option to thepackage.json
file as follows:Then, I removed
node_modules
andpackage-lock.json
and re-installed dependencies after adding theoverrides
section.This resolved the issue after re-running the metro server and re-installing the app.
This is a temporary solution as we are modifying the sub-dependencies of our dependencies which may lead to unexpected behavior. The correct solution is to upgrade the affected dependency itself.
This issue was closed because the author hasn’t provided the requested feedback after 7 days.
@steventnorris
Did the error occur when upgrading to RN 0.72.6?
If you come from a version previous to 0.7x.x you must check which dependency is incompatible with the new version of react native.
Applying this setting helped me to visualize which dependencies were causing the error.
Once you fix the errors you can restore the file you edited in node_modules (this change is just to make it more visible what is going wrong)
I hope it helps!
In my case, it was also the
ViewPropTypes
issue. This is rather strange since the error message is not helpful at all, but basically check that your libraries are compatible with your React Native Version:And as recommended by @ikotsov, you can use patch-package if you want to avoid forking the library for no particular reason
I have same issue but I encounter this error by uninstalling “redux-saga” package which is not supporting to react native (0.70.7) . NOTE : Try to uninstall packages which you have recently install.
I have same issue but I encounter this error by uninstalling “redux-saga” package which is not supporting to react native (0.70.7) . NOTE : Try to uninstall packages which you have recently install.
This issue is waiting for author’s feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.
It is issue in the my dreaming
I am stuck with the same error, tried running it on the ios but not bundling, but worked for android, don’t know why? Need Urgent help.
Same issue here as well, running with
npx expo start
I changed from “react-native”: “0.70.5” -> “react-native”: “0.68.2” and from “react”: “18.1.0” -> “react”: “17.0.2” in package.json, deleted node_modules and package-lock.json, ran “npm install” again and all was well.
Still facing this issue after upgrading RN project to 0.70 :
ERROR TypeError: undefined is not an object (evaluating ‘axios.interceptors.request’)
ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. 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.
It works for me, both npx react-native run and npx expo start https://github.com/facebook/react-native/issues/34688#issuecomment-1365204071
I had the same issue. I am also on RN 0.70.6 but somehow I could not apply the patch provided by @27leaves, so I manually recreated the patch. Here Is my version of patch in case it might help someone (the paths seem different):
Also, I needed to get rid of the package
react-native-easy-toast
and update the packagereact-native-file-viewer
to get rid of the problem…i have same issue. what can i do?
Okay thank you. I have never used expo, so probably someone else is better to help you there 😃
As the error is suggested two possible fixes for this error. So that I hope You’ve installed bable plugin is installed. Now Second possible fix is clear your cache. Just run this command to clear your cache.
react-native start --reset-cache
and now Your error will be resolved. Read More SolutionsThis shows this is coming from your firebase. Kindly check out firebase documentation on how to set up the initialize app
I have for the moment failed at all my attempts to update to RN 0.70 or to start from crash with it, always a dependency that will break the project at one moment. I advise strongly to not update to it for now.
How to solve it:?
Image.propTypes
Text.propTypes
TextInput.propTypes
ColorPropType
EdgeInsetsPropType
PointPropType
ViewPropTypes
u guys need to find this on all node_modules and your js code, change it from react-native and use from
import { ViewPropTypes, TextPropTypes, .... } from 'deprecated-react-native-prop-types';
insteadText.propTypes -> TextPropTypes Image.propTypes -> ImagePropTypes
etc
Dont forget to use
patch-package
for each modules you modified, so u won’t reset it everytime you npm i / yarnReferenceError: Can’t find variable: createMaterialTopTabNavigator ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. 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. ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. 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.
I don’t know if it’s relevant but I solved my problem by adding the ‘react-native-reanimated/plugin’ in the bable.config.js file and refreshing the app using
npx expo start -c
if your project is set up with expo.I got the same error. I was adding Redux to my project, and kept getting the deprecation warning to use configureStore from @reduxjs/toolkit instead of createStore from redux. When I switched to configureStore from the toolkit, it leads to the error. But when using the depreceated createStore it compiles and seems to work just fine.
Currently working with react-native 0.70.5 , react-redux ^8.0.5 , redux ^4.2.0 , and @reduxjs/toolkit ^1.9.0
@karamanmertcan i have upgraded to sdk 47.0 and there’s an issue with.
[ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types](https://stackoverflow.com/questions/71702392/viewproptypes-will-be-removed-from-react-native-migrate-to-viewproptypes-export)
so i couldn’t moved forward even tried sdk 46 as well.
!UPDATE!
Was able to resolve by creating patch – as recommended by @jayscottthomas – but rather than returning just the type I also kept a warning message to remind myself and any other devs working on the project that this needs to be fixed.
The problem is exacerbated based on how many 3rd party dependencies needing to be updated to work with this new requirement. In example, our own project dependencies were relying on react-native-types, and the dependencies within those dependencies also rely upon the same react-native-types.
Though such a patch may not be recommended, for what it’s worth it’s actually a really great fix in that it just works, and it works pretty darn well. Once applied, my application ran without any gripes or issues.
Thanks, @jayscottthomas
What I implemented is below:
./ProjectRoot/patches/react-native+0.70.4.patch
for me it’s ‘injectionStore’ which is the problem in redux
This was my issue as well, downgraded to axios v0.27.2 and everything worked fine.
I have this issue, upgrading to 0.70.3 does not work for me.
EDIT: I got my app working again by updating all my packages in package.json. I can’t say which one did the trick but it’s probably more than one. React native navigation and all peer dependencies, react native reanimated, and others could probably all cause this type of error.
any update? same issue
Same issue here after upgrading all of dependencies my old project with yarn
yarn yarn-upgrade-all
my package.json: