Expo modules core dependency.platformns.ios must be of type object - react-native

I just updated to Expo 43.0 in a bare workflow project and followed the guide on how to update the app to also use expo-modules-core. The app runs in dev mode and can compile to both Android and iOS. However, when running react-native-start the following message is shown in the terminal:
warn Package expo-modules-core has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios" must be of type object
Then the metro server starts. I have tried searching for others with similar issues, does anyone know what may be causing this?
I followed this guide: https://docs.expo.dev/bare/installing-expo-modules/

This warning is coming from react-native-community autolinking. it looks like the api changed and they don't accept null values anymore, but this is what they still specify in their docs. the behavior you see is expected still - expo-modules-core is and should be ignored by react-native-community autolinking, because it's handled by expo autolinking. so, this won't impact your project and it's a warning caused either by an accidental regression or undocumented change in react-native-community autolinking.
https://github.com/expo/expo/issues/16085

Yes, it is coming from react-native. So for resolving this issue you have to remove the react-native.config.js file from node_modules
Follow the bellow steps:-
Go to node_modules/expo-modules-core
Delete react-native.config.js

Related

How to Upgrade React Native Version 0.66.3 to 0.70.6?

Currently, my project running on the 0.66.3 version I need to upgrade to react native version 0.70.6. So I have used to following command
npx react-native upgrade
After running this command showing some error I have attached a screenshot please refer.
I am also trying the manual way using react native helper but some files are not available in my project.
so anyone please tell me how I will upgrade my project version?
After Run npx react-native run-android my build was created successfully but 3 errors showing in the metro bundler. I have attached a screenshot of the metro bundler error.
you can specify a React Native version and pass it as an argument:
npx react-native upgrade 0.70.6
you can also refer this official documentation for this
& it will also helps you if you got any error.
https://reactnative.dev/docs/upgrading
I found by changing react-native - index.js and react-native/Libraries/Text - index.js
Follow this link for output:
https://github.com/facebook/react-native/commit/3f629049ba9773793978cf9093c7a71af15e3e8d
Don't know whether it is the right way or not....
Since upgrading an application can break functionality in your app if you do not know what is needed to be changed. the upgrade is tells you to visit the pages to go through and see what has changed throughout the upgrading process.
Other as that I am just needing more information regarding to what is not working. Since upgrading is more as just running a command, its about reading the documentation and see what part is missing and what they replaced the files with. The missing files could be straight-out deprecated and not working with the new version.
As always check the debugger and read every message throughout and visit all links given and see the documentation regarding the upgrade differences, find out if there are any log files you could look at, and talk with people in your company / group of react-native about this.
"Some files are not available in my project"
This part might just be able to google and see if this is still supported or not in the version it could be phased out, or not supported in the version. that's where versioning comes in to play.
I am unsure what files and which libraries are deprecated based on your Opening Post, this needs more information, to help us, help you.

React-Native, React-Native-Web and React-Navigation/Stack

Has anyone been able to get React-Native 0.7, React-Native-Web and React-Navigation/Stack 6.2.3 to work on web? I have a small app working on iOS and Android which I am trying to enable on web too. iOS and Android portion work fine and using metro.
However, webpack build continues to error out with "Module parse failed: Unexpected token" on the NavigationContainer.
I tried searching both react-native-web and react-navigation Issues on their respective GitHub Repositories. However, could not find something to solve my issue. Also tried modifying webpack.config with several different configurations/loaders.
Used links below as a reference too:
https://arry.medium.com/how-to-add-react-native-web-to-an-existing-react-native-project-eb98c952c12f
https://gist.github.com/skabbes/0bfa0a969aac8ec13f716dda1ad2ab43
Yes, it happens that I maintain a library that does just that: creates a bare React Native app that also runs on the web: 🌒 Luna - https://github.com/criszz77/luna
Here is the live example: https://criszz77.github.io/luna/
You can find more on the wiki page about how it's implemented and you can also implement it by yourself: https://github.com/criszz77/luna/wiki
By using react-scripts, you don't have to handle webpack, babel and other hard configs by yourself.
It currently doesn't run on 0.7 (didn't have time to make the update), but it's in plan to support all the latest versions of course ASAP.
EDIT: Updated to 0.70.3 🎉

'NativeReanimated' could not be found. Verify that a module by this name is registered in the native binary

This is my Code which is showing this error . Here I am trying to make a Drawer-navigation
This is the error showing , I am doing this in react-native.
It seems you might have missed some installation / setup steps for react-navigation.
Please check this section in the docs: https://reactnavigation.org/docs/getting-started#installing-dependencies-into-a-bare-react-native-project
If you have already installed the packages listed there (notably react-native-reanimated), perhaps you have not installed the native dependencies. This is important on iOS - run npx pod-install in your project root, and then build the app again (hot reload will not be enough).

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.

React-Native - Could not find com.google.android.gms:play-services-analytics:15.0.1

When trying to install Pushnotifications for Android in a React Native project I get the following error during building
Could not find com.google.android.gms:play-services-analytics:15.0.1.
I cannot find the place where I would require play-services-analytics. Anyone a clue how I could solve this issue?
I had the same issue. Sometimes, the dependency version used by a package is no longer the recommended minimum that's been pushed by Google. To fix, locate the build.gradle file for the package that is giving you the error (in this case, it should be react-native-push-notification) and change locate the line that contains play-services-analytics under the dependencies, then change the version number to the recommended minimum version listed here. For play-services-analytics, it should be 16.0.5. Here's how it should look like afterward
implementation "com.google.android.gms:play-services-analytics:${safeExtGet('googlePlayServicesVersion', '16.0.5')}"
By far, the easiest way I've found to debug these package error is to get Android Studio. When you run the App from there, it'll error out on any dependency error and open up the gradle file for you, then you just have to fix it.