I'm running an app in Expo XDE and get the following warning:
Expo XDE warning screenshot
The link in the warning just takes you to the Expo docs. I looked through them and it looks like it might have something to do with my app.json file.
My app.json only contains:
{
"expo": {
"sdkVersion": "15.0.0"
}
}
Anyone have any ideas how to get rid of this warning? I'm working in "development mode" (Expo IDE setting) on iOS/mac
Used react-native from expo like this in package.json:
"react-native": "https://github.com/exponent/react-native/archive/sdk-16.0.0.tar.gz",
Related
I created a React Native Project using React Native CLI then installed expo as mentioned in the documentation here
I used the Automatic Method and ran npx install-expo-modules#latest
After that I ran npx pod-install then npx react-native run-ios
But I am getting the following error after that,
I have the following dependencies,
"expo": "^47.0.0",
"react": "18.2.0",
"react-native": "0.71.1",
What am I doing wrong here?
I had the same issue and I just needed to add a distribution certificate to the MacOS key chain, this person's issue on GitHub gives you a good idea on how to do it: https://github.com/expo/eas-cli/issues/1331. I highly recommend viewing the post by KiwiKilian. You can access it here
After adding the certificate to the keychain, the error just went away for me.
Useful resources
https://support.apple.com/en-au/guide/keychain-access/kyca1083/mac
https://support.magplus.com/hc/en-us/articles/203808748-iOS-Creating-a-Distribution-Certificate-and-p12-File
https://developer.apple.com/forums/thread/662300
https://developer.apple.com/support/expiration/
Hope it helped!!
I've been trying to build google maps on my ios React Native emulator but an error appeared saying that AIRrgooglemap dir must be added to Xcode which it has.
I researched ways to make it work such as this link https://cuneyt.aliustaoglu.biz/en/using-google-maps-as-provider-in-ios-with-react-native/ and others and started implementing and changing files on Xcode with no results. Below are the errors seen in React Native IOS emulator and Xcode build
React Native IOS error:
[
Xcode Error:
Thank you
For your question on iOS, I checked the relevant documentation, there should be some steps missing, I suggest you use the following steps:
1.npm install react-native-maps --save
2.react-native link react-native-maps
3.Download the GoogleMaps library, copy it to the ios folder, and link the framework and configuration .bundle resources in Xcode as shown.
4.Configure the package.json file.
"scripts":{
"start": "node node_modules/react-native/local-cli/cli.js start",
"postinstall": "./node_modules/react-native-maps/enable-google-maps 'ios/GoogleMaps-3.1.0/**'", },
5.npm install
6.Configure the code in AppDelegate.m.
7.Write the react-native code.
I made a sample project myself, you can refer to release v0.0.1.
im getting into RN and i want to install my app into my device (production) to take it to anywhere... but i dont know why i cant finish the process, some errors show up.
I'm reading step by step the guide from here: https://facebook.github.io/react-native/docs/running-on-device.html
Using the release method from the guide, i got this error:
main.jsbundle does not exist. This must be a bug with React Native
And i tried the CLI too (react-native run-ios --configuration Release) and the command is looking for index.js
"Cannot find entry file index.js in any of the roots"
The thing is, I tried some weeks ago with a version of RN where I can have an index.ios.js and index.android.js, and now, i'm using RN 0.50.3 and I just have an App.js, there is not more index.ios.js/index.android.js, and that is ok the documentaion is talking about just one file called App.js...
but why is the RN 0.50.3 searching for a index.js?
Why the index.js is missing in my project?, how i can fix this things?
I'm using:
MAC
react-native-cli: 2.0.1
react-native: 0.50.3
Thanks!
When I run my react-native app with Xcode, and after the app starts to load, I see this error:
"Requiring unknown module "react". If you are sure the module is there, try restarting the packager."
My package.json contents are:
{
"name": "the_golf_mentor",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react-native": "^0.21.0",
"react-native-button": "^1.4.2",
"react-native-cookies": "^0.0.5",
"react-native-db-models": "^0.1.3",
"react-native-navbar": "^1.2.1",
"react-native-side-menu": "^0.18.0",
"tcomb-form-native": "^0.3.3"
}
}
I have tried restarting the package manager, and I have also removed the node_module folder and done a fresh npm install. How do I fix this problem?
I had this after enabling hot reloading, and then downgrading my react version to support a library I was using.
Simulator > Reset Content and Settings
Got it running again.
In React Native React lives in react-native module instead of react (for React JS). In that case import React and other React Native modules via:
import React, {
Component,
View,
Text,
// other React Native modules
} from 'react-native';
I encountered the same error. I closed down IDE and restarted, it worked for me. If nothing works out, try npm install
You should require React from react-native in a react-native project, and not from react.
var React = require('react-native');
It turned out that the error message was an interim one I was receiving in the debugger. When I pressed continue a couple of times in the debugger, I received a message in the simulator window which indicated I had not registering the app properly, i.e. my AppRegistry.registerComponent call was invalid.
I suspect this was an unusual cause of the unknown module 'react' error message. In many cases, neciu's answer is probably more useful, so I have also upvoted it as well.
I had similar issue: "Error: Requiring Unknown module 3" after installing '#react-navigation/native', so I did the following to fix it:
Close everything (Metro, Debugger and Simulator)
npm install
npx pod-install ios (On Mac)
npm run ios
and that's it!
A new project created with the latest version of react-native throws javascript error while running(/debugging). Tested this on simulator.
[fatal][tid:main] TypeError: babelHelpers.typeof is not a function. (In 'babelHelpers.typeof(target)', 'babelHelpers.typeof' is undefined)
Installed the react-native client today & created the app using
react-native init AwesomeProject
App version:
react-native-cli: 0.1.10
react-native: 0.20.0
node version: v5.6.0
Here's a comment explaining the issue:
https://github.com/facebook/react-native/issues/4844#issuecomment-204035720
To summarize:
Babel presets 'stage-0' through 'stage-3' contain 'async-to-generator', which is not not necessary for react-native itself.
The solution is to use the unofficial babel preset 'react-native-stage-0'
Example:
npm install babel-preset-react-native-stage-0 --save-dev
.babelrc
{
"presets": ["react-native-stage-0"]
}
or with decorator support
{
"presets": ["react-native-stage-0/decorator-support"]
}
Empty cache and Restart
watchman watch-del-all
./node_modules/react-native/packager/packager.sh start --reset-cache
Solved adding babel stage-1 and react-native preset's to .babelrc in the project's root folder.
{
"presets": ["stage-1", "react-native"],
}
More details here: https://github.com/facebook/react-native/issues/5747
To solve the problem, I renamed a .babelrc file in a parent directory, then ran ./node_modules/react-native/packager/packager.sh start --reset-cache
One issue is that if there is a .babelrc in a parent directory to your app, the packager will read that and it will cause this exact error. One way around it is to add a .babelrc file in your project:
{
"presets": ["react-native"]
}
I updated to the newly released react-native#0.21 and the issue went away. I am not sure if this means the root issue has been resolved since I have seen intermittent success with other "fixes".
Double check your import path/file names as they are case sensitive
It's usually due to a 3rd party npm dependency that has .babelrc or babel es2015 preset specified in it's package.json.
There's a fix in place: https://github.com/facebook/react-native/pull/11093