I can not archive a brand new React Native (0.68.2) iOS project using TypeScript.
What I did
Created a new project and installed CocoaPods
npx react-native init MyApp --template react-native-template-typescriptOpened workspace with XCode, checked "Automatically manage signing" and selected my team
Selected "Any iOS Device (arm64)"
Xcode > Product > Archive
After 1 minute I run into this issue:
<--- JS stacktrace --->
FATAL ERROR: WasmCodeManager::Commit: Cannot make pre-reserved region writable Allocation failed - process out of memory
../node_modules/react-native/scripts/react-native-xcode.sh: line 164: 78153 Abort trap: 6 "$NODE_BINARY" $NODE_ARGS "$CLI_PATH" $BUNDLE_COMMAND $CONFIG_ARG --entry-file "$ENTRY_FILE" --platform "$BUNDLE_PLATFORM" --dev $DEV --reset-cache --bundle-output "$BUNDLE_FILE" --assets-dest "$DEST" $EXTRA_ARGS $EXTRA_PACKAGER_ARGS
Command PhaseScriptExecution failed with a nonzero exit code
What I'm using
- MacBook Pro (2021)
- M1 Max 32 GB
- macOS 12.4
- XCode 13.4
- Node.js 14.18.1
- Terminal with Rosetta
What I already tried
- reinstalling Ruby and rvm
- reinstalling node
- reinstalling CocoaPods
- creating another brand new project