Error compiling Metro iOS XCode 14.2
Opened this issue · 6 comments
Description
Hi everyone, I'm having this problem while compiling the App iOS with Xcode 14.2 on simulator
I tried to check possible solutions, but I can't figure out how to solve this problem!
node: v20.18
node-modules:
package.json
{
"name": "App",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-brands-svg-icons": "^6.6.0",
"@fortawesome/free-regular-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-native-fontawesome": "^0.3.2",
"@react-native-async-storage/async-storage": "^2.0.0",
"@react-native-firebase/app": "^20.5.0",
"@react-native-firebase/messaging": "^20.5.0",
"@react-native-masked-view/masked-view": "^0.3.1",
"@react-native-picker/picker": "^2.8.1",
"@react-navigation/bottom-tabs": "^6.6.1",
"@react-navigation/core": "^6.4.17",
"@react-navigation/native": "^6.1.18",
"@react-navigation/stack": "^6.4.1",
"axios": "^1.7.7",
"expo-modules-core": "^1.12.24",
"hermes-engine": "^0.11.0",
"react": "18.2.0",
"react-native": "^0.72.3",
"react-native-bootsplash": "^6.1.3",
"react-native-gesture-handler": "^2.19.0",
"react-native-navigation": "^7.40.1",
"react-native-picker-select": "^9.3.1",
"react-native-reanimated": "^3.15.1",
"react-native-safe-area-context": "^4.10.9",
"react-native-screens": "^3.34.0",
"react-native-svg": "^15.6.0",
"react-navigation": "^5.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.75.2",
"@react-native/eslint-config": "0.75.2",
"@react-native/metro-config": "0.75.2",
"@react-native/typescript-config": "0.75.2",
"@types/react": "^18.0.24",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.2.1",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.73.9",
"prettier": "^2.4.1",
"react-test-renderer": "18.2.0",
"typescript": "4.8.4"
},
"engines": {
"node": ">=18"
},
"packageManager": "yarn@1.22.22"
}
Steps to reproduce
N/A
React Native Version
0.72.3
Output of npx react-native info
System:
OS: macOS 12.7.6
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 624.72 MB / 16.00 GB
Shell:
version: 5.8.1
path: /bin/zsh
Binaries:
Node:
version: 20.18.0
path: ~/.nvm/versions/node/v20.18.0/bin/node
Yarn:
version: 1.22.22
path: ~/.nvm/versions/node/v20.18.0/bin/yarn
npm:
version: 10.8.2
path: ~/.nvm/versions/node/v20.18.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.16.2
path: /Users/edoardo/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.2
- iOS 16.2
- macOS 13.1
- tvOS 16.1
- watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode:
version: 14.2/14C18
path: /usr/bin/xcodebuild
Languages:
Java: Not Found
Ruby:
version: 3.2.6
path: /Users/edoardo/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.17
wanted: ^0.72.3
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Screenshots and Videos
No response
Warning
Unsupported version: It looks like your issue or the example you provided uses an unsupported version of React Native.
Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.
Warning
Unsupported version: It looks like your issue or the example you provided uses an unsupported version of React Native.
Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.
Warning
Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:
- If your bug is UI related: a Snack
- If your bug is build/upgrade related: a project using our Reproducer Template
- Otherwise send us a Pull Request with the RNTesterPlayground.js edited to reproduce your bug.
Hey @edoardocarpentiero,
The version 0.72 is out of support. Please migrate to minimum v0.74 and add a minimal reproducer.
Hi @migueldaipre,
unfortunately I can't increase the react version because I have a mac with OS Monterey and Xcode 14.2 (the last version supported by the OS) and react 0.72.3 is the latest version compatible with this configuration.
Do I need to change the version of the reported metro dependencies: "metro-react-native-babel-preset": "0.73.9",
and "@react-native/metro-config": "0.75.2"?
@edoardocarpentiero I would definitely try that — react-native
and @react-native/*
dependencies must be in line at the same major version (0.72.x
only, in your case).
As mentioned, unfortunately React Native 0.72 is out of support. Not sure how your project got in this state, but would either leave your dependencies at their previous versions (last time the project worked), or wholesale update to RN 0.74 or higher.