react-native 0.42 Expected array with count 16 - react-native

After upgrading to React Native 0.42 in order to get FlatList support, My app no longer runs properly. I get the following error:
The only related information I could find was this github issue for react-navigation a package which I am not using.
Can anyone suggest a way to debug this issue, or any fix to get rid of it.
I have tried the usual deleting node_modules and re-installing.
UPDATE
I have isolated the issue to the Navigator component, As I stop receiving this error if I simply render the initial route without the Navigator
But a new app created with react-native init didn't have any trouble rendering a Navigator
very much at a loss as to how to procede. Thanks in advance.

It turns out I simply forgot to clear the build directory under ios, which resulted in running new Javascript on an old native build. Removing this showed me merge conflicts in the ios files.

For me was not enough to remove the ios/build folder what I worked was to execute react-native upgrade which re-creates the bundle of the dependencies at the mentioned folder

Related

Issue upgrading React Native to latest version 0.71

I tried using the command "npx react-native upgrade" to update my React Native app from version 0.67 to version 0.71, however, this command has never worked for me. Therefore, I had to manually apply changes using upgrade helper, but here I encountered the following strange alphanumeric numbers when manually applying all the modifications to "ios/appName.xcodeproj/project.pbxproj":
How can I handle this problem in my current project? Is it acceptable to duplicate them in my project as it seems that these alphanumeric references vary from one project to the next?
When I upgraded React Native, I had a similar problem, but it turned out that I didn't need to make any manual changes to that file line by line; instead, I just made changes to other files, and after running "npx pod-install ios," that file immediately updated.
Update: I realized the file AppDelegate.m isn't updated to AppDelegate.mm. Therefore, you have to do it manually.

react-native-reanimated Missing File Error

I am trying to compile my React Native application with Expo and for some reason, I keep encountering this issue with react native reanimated. I have removed and installed this package several times, and nothing is working. I even tried removing that line in the appropriate file within the node_modules folder, but it appears that deleting the line had no effect, as this error continues to pop up. I tried changing versions of react-native-reanimated as well. Has anyone else experienced this issue? Is there a solution to this?

Expo: Can't find variable require

Dear stackoverflow community,
I'm not able to find any solution online for my problem. My error is the following:
Can't find variable: require
http://127.0.0.1:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:5:24
global code#http://127.0.0.1:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:701:3
Screenshot Expo Error
It was working perfectly 2 days ago, and (apparently) I didn't change anything since then.
Do you have any idea where it can come from?
I'm using:
expo#~3.0.10
react-native "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz"
Very basic configuration. I'm suspecting some kind of miss configuration...
Thanks in advance!
Regards,
Guillaume
Updates 09-02-2020 4pm20:
I tried cleaning caches,
I tried changing directory,
I tried expo init a new app, importing the sources of the previous app, installing dependencies, it worked until I ran expo start -c, then the problem came back,
Still working on it...
Updates 09-02-2020 7pm:
I finally succeed to make it work.
Update expo-cli to the latest version
Initialize a new expo app in another directory
Copy/paste source code
Use expo start -c instead of expo start to make sure no cache is involved in the following steps
Install dependencies one by one to make sure none is the problem
Finally test the app
try by adding, import React from 'react' in the file where you mentioned require
first : expo r -c ,
then : npm start,
finally: use require function

React native app sourcemaps show incorrect location of error when error happens in asynchronous code

I have a react-native app. I recently moved to react-native version 0.61.5 for which I took the long route of creating a new react-native app and porting my code over to avoid any linking issues since new version used PODFILE as the default linking mechanism. Ever since I moved to version 0.61.5, I don't get the correct location of code in error logs. I think this is mainly happening when the code is running in asynchronous fashion which most of the code is. For e.g., look at below screenshot:
It is reporting that it is not able to call map on some array which is apparently undefined but the place where the error is reported is completely incorrect. I have no such file in my codebase and it is probably pointing to some file in some react-native package.
I am using Sentry #sentry/react-native": "^1.1.0". I don't think Sentry can cause issue with the sourcemaps reported during development.
I am not sure how to debug this problem. This problem is causing a lot of issues in debugging any errors as I have to manually figure out where the error happened. Please let me know if you have any tips on how to fix this problem.

"babelHelpers.interopRequireDefault is not a function" when upgrading to React Native 0.16.0-rc

I upgraded to react-native 0.16.0-rc, ran npm install, then ran react-native upgrade. When trying to launch the iOS app in a simulator (or device, doesn't matter) I get the error:
[error][tid:com.facebook.React.RCTExceptionsManagerQueue] Unhandled JS Exception: babelHelpers.interopRequireDefault is not a function. (In 'babelHelpers.interopRequireDefault(_reactNative)', 'babelHelpers.interopRequireDefault' is undefined)
I've just about run out of ideas here. Is there something I need to add to my xcode project maybe? Merging the latest react-native templates into mine was a nightmare so maybe something got messed up there.
This problem is discussed in this Github issue and fixed by this commit. You can apply this patch temporarily until it is merged into the project with the version 0.16.