简体   繁体   中英

React native build failed in iOS - PhaseScriptExecution

I am facing issue in react-native project. It's working fine in android but build failed in iOS version. I have already tried all possible solution, but didn't get any solution.

The main problem is PhaseScriptExecution.

Xcode version - 12.4

Mac OS version - 11.3 (Big Sur)

npm version - 7.10.0

react-native version - 0.64.0

react version - 17.0.1

For mode detail, i am attaching the screenshot.

/Users/mmdev1/Library/Developer/Xcode/DerivedData/PRJ22-edpcityjusyktkdaxtnvzawndbxa/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-99DF087F7D2E061B36AA638AA7C0AD26.sh: line 4: 16519 Segmentation fault: 11 bash -l -c 'SRCS_DIR=/Users/mmdev1/Documents/RN/PRJ22/node_modules/react-native/scripts/../Libraries CODEGEN_MODULES_OUTPUT_DIR=/Users/mmdev1/Documents/RN/PRJ22/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec CODEGEN_MODULES_LIBRARY_NAME=FBReactNativeSpec /Users/mmdev1/Documents/RN/PRJ22/node_modules/react-native/scripts/generate-specs.sh' 2>&1

在此处输入图像描述 在此处输入图像描述 在此处输入图像描述

I was getting the same failure, and I have not been able to pinpoint exactly why this works, but in my package.json I changed

"scripts": {
    "ios": "react-native run-ios",
}

to

"scripts": {
    "ios": "unset PREFIX && react-native run-ios",
}

As I was seeing some issues regarding the PREFIX env variable when using Node Versioning Manager (nvm).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM