Please I am facing this error currently in my expo app, is there anyone that can help please, I just upgrade our app to expo / SDK 46.0.0, React native 0.69.6, and I was forced to upgrade to reanimated 2.9.1. thereby bringing this error every time I run npm start —clear, I have imported it in barbel.config.js as mentioned in the documentation. thank you.
ERROR TypeError: _ReanimatedModule.default.configureProps is not a function. (In '_ReanimatedModule.default.configureProps(Object.keys(NATIVE_THREAD_PROPS_WHITELIST), Object.keys(UI_THREAD_PROPS_WHITELIST))', '_ReanimatedModule.default.configureProps' is undefined)
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
Please help thanks.
Hi @amanhimself, thanks for your reply. I was not able to resolve the reanimated issue so for that I created a fresh expo project and copy (package.json, screens, and components) but unfortunately, there is another weird error that’s been thrown. I am so devastated right now. something that’s supposed to take a few hours is taking 3-4 days now.
this is the error I am getting
ERROR Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: number.
Check the render method of `index`.
I am using class components and I have checked through all the screens and components I did not see any mismatch of import/export. if you have time can you help look at it? or any suggestion you think may help? thank you.
Hey, I’m sorry you’re stuck on an issue like this, and I understand that this is frustrating.
The error you stated is usually caused by some component not being exported correctly but being imported in another. I’d suggest you to check the library imports in your project. Maybe there is a library import that has changed over time. For example, a similar forum post like this.
Also, if you feel you can share a minimal reproducible example, I can take a look, or if you can share it in a repo privately.
Hi @amanhimself , Thank you so much for your help. I later figured it out. It’s the svgs. Normally, we can’t import svg direct as a component in the native apps the way we used to on the web, however, there’s one package that usually does that though. “Svg transformer”. Without the package transformed the svg, it will be returning numbers hence causing the app breaking and resulting to that errors.
Since I have just made a fresh project so I forgot to do the configuration.
Though I have to abandon the first project since was not able To resolve reanimated error.
But the fresh one is working now.