In my react native project, how do configure it to interpret jsi instead of jsc? - ios

When trying to run the ios version of my react-native project I keep running into an
error. The error I keep getting is: /Users/me/Desktop/Popper/node_modules/react-native/ReactCommon/jsc/JSCRuntime.h /Users/me/Desktop/Popper/node_modules/react-native/ReactCommon/jsc/JSCRuntime.h: No such file or directory
The command I use to run ios is npx react-native run-ios
I have run it in xCode and it produces the same error.
When I go through that path, I notice that the JSCRuntime.h is located under a folder called jsi instead of jsc which does not exist. How do I reroute the builder to /jsi/JSCRuntime.h instead of /jsc/JSCRuntime.h?
My dependencies are the following:
"dependencies": {
"#react-native-async-storage/async-storage": "^1.17.11",
"#react-native-firebase/app": "^16.5.0",
"#react-native-firebase/auth": "^16.5.0",
"#react-native-firebase/firestore": "^16.5.0",
"#react-navigation/bottom-tabs": "^6.5.3",
"#react-navigation/material-top-tabs": "^6.5.2",
"#react-navigation/native": "^6.1.2",
"#react-navigation/native-stack": "^6.9.8",
"expo": "~47.0.9",
"expo-splash-screen": "~0.17.5",
"expo-status-bar": "~1.4.2",
"font-awesome": "^4.7.0",
"react": "18.1.0",
"react-native": "^0.70.5",
"react-native-onboarding-swiper": "^1.2.0",
"react-native-pager-view": "^6.1.2",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.19.0",
"react-native-tab-view": "^3.3.4",
"react-native-vector-icons": "^9.2.0",
"react-navigation": "^4.4.4"
},
When running the android version of my app, it compiles, builds, and runs properly. Furthermore, the project was generated using expo bare-minimum workflow.

Related

Missing node module error even though it's installed on a webdriverio/electron project. (ts-node)

I cannot figure out why I am getting the below error. I'm trying to set up webdriver-io for an existing electron project.
node:internal/errors:465
ErrorCaptureStackTrace(err);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\user\automation\product\src\product.client\
node_modules\ts-node\esm\transpile-only' imported from C:\Users\user\automation\product\src\product.client\
at new NodeError (node:internal/errors:372:5)
at finalizeResolution (node:internal/modules/esm/resolve:437:11)
at moduleResolve (node:internal/modules/esm/resolve:1009:10)
at defaultResolve (node:internal/modules/esm/resolve:1218:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
at ESMLoader.import (node:internal/modules/esm/loader:380:22)
at initializeLoader (node:internal/process/esm_loader:74:49)
at loadESM (node:internal/process/esm_loader:87:11)
at runMainESM (node:internal/modules/run_main:51:21) {
code: 'ERR_MODULE_NOT_FOUND'
}
I have been through the google desert. Of course I understand it's not found. But I can't figure out why it's not found? ts-node is installed. My package.json is below:
"devDependencies": {
"#types/chalk": "^2.2.0",
"#types/chart.js": "^2.9.34",
"#types/command-line-args": "^5.0.0",
"#types/execa": "^2.0.0",
"#types/node": "^14.6.0",
"#types/request": "^2.48.7",
"#typescript-eslint/eslint-plugin": "^2.18.0",
"#typescript-eslint/parser": "^2.18.0",
"#wdio/cli": "^8.3.3",
"#wdio/devtools-service": "^7.16.14",
"chalk": "^4.1.0",
"command-line-args": "^5.1.1",
"cross-env": "^7.0.2",
"electron-chromedriver": "^13.0.0",
"electron-packager": "^15.2.0",
"electron-wix-msi": "^3.2.0",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.0",
"execa": "^4.0.3",
"rimraf": "^3.0.2",
"ts-node": "^8.10.2",
"typescript": "^4.9.5",
"wdio-electron-service": "^3.5.1",
"webdriverio": "^7.7.4",
"yarn-run-all": "^3.1.1"
},
"dependencies": {
"chart.js": "2.9.4",
"electron": "^23.0.0",
"react-number-format": "^4.8.0"
}
}
Can any kind soul help me figure out what it's looking for or how to get around it? I'm very frustrated.
I don’t know if you already figured it out or not but I had the exact same error and it was a problem with the version of ts-node. So basically install a newer version of ts-node the one I installed was 10+. Hope this helps.

Expo SDK 46 iOS build failed in pod installation step

I am trying to build iOS app from expo managed project. The build fails At Pod installation step.
In Expo SDK 44, 45 everything was okay. But when I upgrade to SDK 46, I am facing the issue.
Here is my package.json
{
"name": "App1234",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"#expo/vector-icons": "^13.0.0",
"#openspacelabs/react-native-zoomable-view": "^2.0.4",
"#react-native-community/datetimepicker": "6.2.0",
"#react-native-community/netinfo": "9.3.0",
"#react-native-community/slider": "4.2.3",
"#react-native-google-signin/google-signin": "^8.1.0",
"#react-navigation/bottom-tabs": "^6.4.0",
"#react-navigation/drawer": "^6.5.0",
"#react-navigation/native": "^6.0.13",
"#react-navigation/native-stack": "^6.9.0",
"#react-navigation/stack": "^6.3.2",
"#stripe/stripe-react-native": "0.13.1",
"#types/react-native": "~0.69.1",
"apisauce": "^2.1.6",
"expo": "~46.0.13",
"expo-apple-authentication": "^4.3.0",
"expo-constants": "^13.2.4",
"expo-document-picker": "^10.3.0",
"expo-firebase-recaptcha": "^2.3.0",
"expo-font": "^10.2.1",
"expo-image-picker": "^13.3.1",
"expo-linear-gradient": "^11.4.0",
"expo-linking": "^3.2.2",
"expo-location": "^14.3.0",
"expo-notifications": "^0.16.1",
"expo-secure-store": "^11.3.0",
"expo-tracking-transparency": "^2.3.1",
"expo-updates": "^0.14.6",
"firebase": "9.9.2",
"formik": "^2.2.9",
"html-entities": "^2.3.3",
"lodash": "^4.17.21",
"lottie-react-native": "5.1.3",
"mime": "^3.0.0",
"moment": "^2.29.4",
"qs": "^6.11.0",
"react": "18.0.0",
"react-native": "0.69.6",
"react-native-draggable-flatlist": "^3.1.2",
"react-native-fbsdk-next": "^11.0.0",
"react-native-geocoding": "^0.5.0",
"react-native-gesture-handler": "~2.5.0",
"react-native-google-mobile-ads": "^8.2.0",
"react-native-maps": "0.31.1",
"react-native-phone-number-input": "^2.1.0",
"react-native-progress": "^5.0.0",
"react-native-razorpay": "^2.2.9",
"react-native-read-more-text": "^1.1.2",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-svg": "12.3.0",
"react-native-webview": "11.23.0",
"react-native-youtube-iframe": "^2.2.2",
"typescript": "^4.6.3",
"yup": "^0.32.11"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
Here is Install Pods logs
Using Expo modules
Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.13.2/bin/node
Adding a custom script phase for Pod RNGoogleMobileAds: [RNGoogleMobileAds] Configuration
Auto-linking React Native modules for target `HomListi`: RNDateTimePicker, RNGestureHandler, RNGoogleMobileAds, RNGoogleSignin, RNReanimated, RNSVG, RNScreens, lottie-react-native, react-native-fbsdk-next, react-native-maps, react-native-netinfo, react-native-razorpay, react-native-safe-area-context, react-native-slider, react-native-webview, and stripe-react-native
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[stderr] /Users/expo/workingdir/build/node_modules/react-native-fbsdk-next/react-native-fbsdk-next.podspec:4: warning: already initialized constant Pod::FBSDKVersion
[stderr] /Users/expo/workingdir/build/node_modules/react-native-fbsdk-next/react-native-fbsdk-next.podspec:4: warning: previous definition of FBSDKVersion was here
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
[!] CocoaPods could not find compatible versions for pod "ExpoAdapterGoogleSignIn":
In Podfile:
ExpoAdapterGoogleSignIn (from `../node_modules/#react-native-google-signin/google-signin/ios`)
Specs satisfying the `ExpoAdapterGoogleSignIn (from `../node_modules/#react-native-google-signin/google-signin/ios`)` dependency were found, but they required a higher minimum deployment target.
Error: Compatible versions of some pods could not be resolved.
You are seeing this error because either:
- Versions in the cached Podfile.lock do not match required values in Podspecs of some installed libraries. To fix this, you can re-run build command with "--clear-cache" option, or select "Clear cache and retry build" on the build page.
- Some of the pods used in your project depend on different versions of the same pod. See logs for more information.
I've used 'eas build -p ios' command
also used 'eas build -p ios --clear-cache'
didn't work.
Can anybody help please. Please please please!!!!
Update your Podfile platform to 13:
platform :ios, '13.0'
Update the Pod file i.e platform to 13.0 or higher.
platform :ios, podfile_properties['ios.deploymentTarget'] || '13.0'
try downgrade version "#react-native-google-signin/google-signin":"8.0.0"

Invalid UIAccessibilitys 'tablist' error after installing react-native-vector-icons and running pod update on ios

I tried to install react-native-vector-icons and ran pod update and got the following error:
https://i.stack.imgur.com/FcVr0.jpg
now this pops up but I can build and run the app just fine.
is this ok? and how can I fix this ?
after this started happening I unlinked react-native-vector-icons and uninstalled it
but for some reason I still get this error, now I tried debugging it and it seems to have some thing to do with "#react-navigation/bottom-tabs" package.
my package.json:
},
"dependencies": {
"#eva-design/eva": "^2.1.1",
"#react-navigation/bottom-tabs": "^6.2.0",
"#react-navigation/native": "^6.0.8",
"#react-navigation/native-stack": "^6.5.0",
"#ui-kitten/components": "^5.1.1",
"#viro-community/react-viro": "^2.20.2",
"react": "17.0.2",
"react-native": "0.65.1",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.11.1",
"react-native-svg": "^12.1.1",
"react-redux": "^7.2.6",
"redux": "^4.1.2",
"fsevents": "^2.3.2"
},
"devDependencies": {
"#babel/core": "^7.15.0",
"#babel/runtime": "^7.15.3",
"#react-native-community/eslint-config": "^3.0.0",
"babel-jest": "^27.0.6",
"eslint": "^7.32.0",
"jest": "^27.0.6",
"metro-react-native-babel-preset": "^0.66.2",
"react-native-codegen": "^0.0.7",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
}
would appreciate any help :)
I am facing the same issue. And I resolved it.
Go to node_modules -> #react-navigation -> bottom-tabs.
Find all accessibilityRole (in file BottomTabBar and BottomTabItem -> it is located at bottom-tabs/lib/commonjs/views and bottom-tabs/lib/module/views and bottom-tabs/src/views) and change it to none.
I changed accessibilityRole="tablist" to accessibilityRole="none"
And change accessibilityRole: Platform.select({ ios: 'button', default: 'tab' }) to accessibilityRole: Platform.select({ ios: 'button', default: 'none' })
This issue will be resolved. But when you install new package, you must do it again :))
This is definitely a problem with the built-in react-navigation tabs, but the issue went away when I created a custom tab bar.

"tried to register two views with the same name RNCSafeAreaProvider" error on IOS

I'm receiving the following error when running react native app using expo on IPhone (on android it's working correctly)
An image of the error is attached.
In addition, this is my package.json file:
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#expo/vector-icons": "^12.0.4",
"#react-native-community/masked-view": "^0.1.10",
"axios": "^0.21.1",
"expo": "~40.0.0",
"expo-app-loading": "^1.0.1",
"expo-font": "^9.0.0",
"expo-status-bar": "~1.0.3",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.0.1",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "^2.18.1",
"react-native-web": "~0.13.12",
"react-navigation": "^4.4.4",
"react-navigation-header-buttons": "^7.0.0",
"react-navigation-stack": "^2.10.4",
"react-redux": "^7.2.3",
"redux": "^4.0.5"
},
"devDependencies": {
"#babel/core": "^7.9.0" },
"private": true
}
Any idea will be appreciated.
you have two versions of react-native-safe-area-context installed in your app. remove react-native-safe-area-context from your dependencies and run expo install react-native-safe-area-context
In this link you can find the solution approved by a collaborator.
In my case, problem persisted and I did as suggested in the link above but I skip steps 2 and 5. I kept expo version in 4.1.0.
delete node_modules and your lockfile (package-lock.json /
yarn.lock)
change the expo package version in package.json to 38.0.8
remove react-native-safe-area-context from your package.json
run yarn or npm install
run expo install react-native-safe-area-context
try running
cd ios && pod install

when I run this NPX POD-INSTALL it gives me this COCOAPODS IS NOT SUPPORTED IN THIS PROJECT #ReactNative

Package.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#react-native-community/masked-view": "^0.1.10",
"#react-native-firebase/app": "^8.4.2",
"#react-navigation/native": "^5.6.1",
"#react-navigation/stack": "^5.6.2",
"expo": "^39.0.3",
"expo-ads-admob": "~8.3.0",
"expo-av": "~8.6.0",
"expo-image-picker": "~9.1.0",
"expo-status-bar": "^1.0.0",
"expo-web-browser": "~8.5.0",
"firebase": "7.9.0",
"lottie-react-native": "~2.6.1",
"react": "~16.11.0",
"react-dom": "~16.11.0",
"react-native": "^0.63.3",
"react-native-appearance": "~0.3.3",
"react-native-dark-mode": "^0.2.2",
"react-native-elements": "^2.3.2",
"react-native-gesture-handler": "^1.6.1",
"react-native-hide-show-password-input": "^1.1.0",
"react-native-material-ripple": "^0.9.1",
"react-native-paper": "^4.0.1",
"react-native-reanimated": "^1.9.0",
"react-native-safe-area-context": "^3.0.2",
"react-native-screens": "^2.9.0",
"react-native-tts": "^3.2.0",
"react-native-vector-icons": "^7.1.0",
"react-native-web": "~0.11.7",
"react-navigation": "^4.4.0",
"react-navigation-stack": "^2.8.2",
"yarn": "^1.22.10"
},
"devDependencies": {
"#babel/core": "^7.8.6",
"#types/react": "~16.9.41",
"#types/react-native": "~0.62.13",
"typescript": "~3.9.5"
},
"private": true
}
This is Package.json of my project in react native. How to install cocoa pods in this project I read somewhere that when using expo dependencies in the project you can't install cocoapods in the project so how to install cocoa pods when using expo dependencies
You just can't install cocoa pods when using expo, that simple. If you need some library from react native community that needs to install cocoa pods, you just can't use it unless expo made its own. You can check if that library is available for expo here: https://docs.expo.io/versions/latest/
Almost everything from react native community has its own expo version if needed.
To install, use $ expo install <module-name>.
You should use expo bare workflow if you want to add react native librairies which are not included in expo client already.
With Expo bare workflow you can still use expo modules like expo-ad-mobs and even expo client if you have some fail over strategy for your newly added librairies.
https://docs.expo.io/bare/exploring-bare-workflow/
But you will have to build the app yourself, while expo managed workflow lets you use expo cli & infrastructure to build your ipa/apk.
If you just want to build the app and not add any other library, just use expo cli commands like expo build:ios

Resources